Skip to content

Commit

Permalink
fix: reset page number in handle search in url filter hook
Browse files Browse the repository at this point in the history
  • Loading branch information
eshankvaish committed Jan 29, 2024
1 parent b893a98 commit 2be7e4b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "0.0.58-beta-10",
"version": "0.0.58-beta-11",
"description": "Supporting common component library",
"main": "dist/index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/Common/Hooks/useUrlFilters/useUrlFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const useUrlFilters = <T = string>({ initialSortKey }: UseUrlFiltersProps<T> = {

const handleSearch = (searchTerm: string) => {
_updateSearchParam(SEARCH_KEY, searchTerm)
_resetPageNumber()
}

const handleSorting = (_sortBy: T) => {
Expand Down

0 comments on commit 2be7e4b

Please sign in to comment.