Fix Cancel button behavior on TopFilterAndSort bar (#106)

This commit is contained in:
Charles Bochet
2023-05-06 08:27:14 +02:00
committed by GitHub
parent 354cdb6ad9
commit 7ac2f8e1a6
5 changed files with 37 additions and 19 deletions
@@ -157,6 +157,12 @@ function TableHeader<SortField, FilterProperties>({
filters={filters}
onRemoveSort={sortUnselect}
onRemoveFilter={filterUnselect}
onCancelClick={() => {
innerSetFilters([]);
onFiltersUpdate && onFiltersUpdate([]);
innerSetSorts([]);
onSortsUpdate && onSortsUpdate([]);
}}
/>
)}
</StyledContainer>