Skip to content

Commit

Permalink
fix: crash on discrete multi select column filter
Browse files Browse the repository at this point in the history
Fix #810
  • Loading branch information
ptitFicus committed Apr 23, 2024
1 parent 4a8387e commit 3f97ecb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion izanami-frontend/src/components/GenericTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ function Filter({ column }: { column: Column<any>; table: Table<any> }) {
options={options}
onChange={(e) => {
const values = e.map(({ value }) => value);
column.setFilterValue(values);
if (values.length === 0) {
column.setFilterValue(undefined);
} else {
column.setFilterValue(values);
}
}}
isMulti
/>
Expand Down

0 comments on commit 3f97ecb

Please sign in to comment.