mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
fix: search page reset button resets the sort too now
This commit is contained in:
1 parent
1da517746a
commit
b9d4c391fe
2 files changed
+9
-2
No files matched your search
@@ -11,6 +11,10 @@ import { ReloadIcon } from '@radix-ui/react-icons';
|
||||
import { Box, Flex, IconButton, Text } from '@radix-ui/themes';
|
||||
import { times } from 'lodash-es';
|
||||
import { $tankFilters, initialTankFilters } from '../../../stores/tankFilters';
|
||||
import {
|
||||
$tankopediaSort,
|
||||
initialTankopediaSort,
|
||||
} from '../../../stores/tankopediaSort';
|
||||
import { classIcons } from '../../ClassIcon';
|
||||
import { ExperimentIcon } from '../../ExperimentIcon';
|
||||
import { GunAutoloaderIcon } from '../../GunAutoloaderIcon';
|
||||
@@ -441,6 +445,7 @@ export function FilterControl({ compact }: FilterControlProps) {
|
||||
color="red"
|
||||
onClick={() => {
|
||||
$tankFilters.set(initialTankFilters);
|
||||
$tankopediaSort.set(initialTankopediaSort);
|
||||
}}
|
||||
>
|
||||
<ReloadIcon />
|
||||
|
||||
@@ -9,7 +9,9 @@ export interface TankopediaSort {
|
||||
direction: TankopediaSortDirection;
|
||||
}
|
||||
|
||||
export const $tankopediaSort = map<TankopediaSort>({
|
||||
export const initialTankopediaSort: TankopediaSort = {
|
||||
by: 'meta.none',
|
||||
direction: 'descending',
|
||||
});
|
||||
};
|
||||
|
||||
export const $tankopediaSort = map<TankopediaSort>(initialTankopediaSort);
|
||||
Reference in new issue
Block a user