fix: filter custom date select toggle (#4244)
This commit is contained in:
parent
5d8c5b22e8
commit
beff8536c9
12 changed files with 79 additions and 10 deletions
|
|
@ -43,12 +43,12 @@ export const ArchivedModulesHeader: FC = observer(() => {
|
|||
const handleFilters = useCallback(
|
||||
(key: keyof TModuleFilters, value: string | string[]) => {
|
||||
if (!projectId) return;
|
||||
|
||||
const newValues = currentProjectArchivedFilters?.[key] ?? [];
|
||||
|
||||
if (Array.isArray(value))
|
||||
value.forEach((val) => {
|
||||
if (!newValues.includes(val)) newValues.push(val);
|
||||
else newValues.splice(newValues.indexOf(val), 1);
|
||||
});
|
||||
else {
|
||||
if (currentProjectArchivedFilters?.[key]?.includes(value)) newValues.splice(newValues.indexOf(value), 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue