Skip to content

Commit

Permalink
[OPIK-129] [UX Improvements] Show filter item by default when clickin…
Browse files Browse the repository at this point in the history
…g on Filters (#288)
  • Loading branch information
andriidudar authored and Douglas Blank committed Oct 4, 2024
1 parent c1cdc87 commit 2b4d257
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ const FiltersButton = <TColumnData,>({

useEffect(() => {
if (!open) {
setFilters(initialFilters);
if (initialFilters.length === 0) {
setFilters([createEmptyFilter()]);
} else {
setFilters(initialFilters);
}
}
}, [initialFilters, open]);

Expand Down

0 comments on commit 2b4d257

Please sign in to comment.