Skip to content

Commit

Permalink
Add option to unselect the removed tag fix trento-project#416
Browse files Browse the repository at this point in the history
  • Loading branch information
EMaksy committed Aug 29, 2022
1 parent 1b8b357 commit 0b85930
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions assets/js/components/Table/filters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const setFilter = (filters, filterKey, filterValue, filterFunction) => {
const { key } = current;
return filterKey === key
? {
found: true,
filtersList: [
...filtersList,
{ key, value: filterValue, filterFunction },
],
}
found: true,
filtersList: [
...filtersList,
{ key, value: filterValue, filterFunction },
],
}
: { found, filtersList: [...filtersList, current] };
},
{ found: false, filtersList: [] }
Expand All @@ -45,7 +45,7 @@ export const TableFilters = ({ config, data, filters, onChange }) => {
.map((column) => {
const filterValue = getFilter(column.key, filters);
const filterOptions = uniq(
data.map(({ [column.key]: option }) => option).flat(Infinity)
data.map(({ [column.key]: option }) => option).flat(Infinity).concat(filterValue)
);

return (
Expand Down

0 comments on commit 0b85930

Please sign in to comment.