Skip to content

Commit 396dc31

Browse files
authored
fix: update all query params in one call (#1234)
1 parent 29b6801 commit 396dc31

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/components/src/templates/next/layouts/Collection/useCollection.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ export const useCollection = ({
7575
)
7676

7777
const handleClearFilter = useCallback(() => {
78-
handleSearchValueChange("")
79-
setAppliedFilters([])
80-
}, [handleSearchValueChange, setAppliedFilters])
78+
updateQueryParams({
79+
newParams: { search: "", filters: "[]", page: "1" },
80+
})
81+
}, [updateQueryParams])
8182

8283
return {
8384
paginatedItems,

0 commit comments

Comments
 (0)