Skip to content

Commit

Permalink
filter resets
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Dec 8, 2024
1 parent 1747d96 commit cb6323c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/CippTable/CIPPTableToptoolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,18 @@ export const CIPPTableToptoolbar = ({
};

const setTableFilter = (filter, filterType) => {
if (filterType === "reset") {
table.setGlobalFilter("");
table.setShowColumnFilters(false);
return;
}
if (filterType === "global" || filterType === undefined) {
table.setGlobalFilter(filter);
}
if (filterType === "column") {
table.setShowColumnFilters(true);
table.setColumnFilters(filter);
}
if (filterType === "reset") {
table.resetGlobalFilter();
table.resetColumnFilters();
console.log(table);
}
};
return (
<>
Expand Down

0 comments on commit cb6323c

Please sign in to comment.