Skip to content

Commit

Permalink
fix: remove categories_associate filters when removing categories filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNumericite committed Jan 29, 2024
1 parent d3cb8fb commit 66f9ed5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions webapp-next/components/layouts/FiltersShortcut.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ export function FiltersShortcut() {
/>
));
case 'categories':
return filters[key].map(value => (
<CustomTag
key={`${key}-${value}`}
field_name={key}
value={getLabelFromKey(value)}
onDelete={() => {
setFilters({
...filters,
[key]: filters[key].filter(v => v !== value),
categories_associate: []
});
}}
/>
));
case 'categories_associate':
case 'death_location':
case 'sex':
Expand Down

0 comments on commit 66f9ed5

Please sign in to comment.