From 2be7e4b422c82647316192962106333bffda382b Mon Sep 17 00:00:00 2001 From: Eshank Vaish Date: Mon, 29 Jan 2024 15:49:13 +0530 Subject: [PATCH] fix: reset page number in handle search in url filter hook --- package-lock.json | 4 ++-- package.json | 2 +- src/Common/Hooks/useUrlFilters/useUrlFilters.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3a4e6bdbc..1ab4f7d06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.0.58-beta-10", + "version": "0.0.58-beta-11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.0.58-beta-10", + "version": "0.0.58-beta-11", "license": "ISC", "dependencies": { "fast-json-patch": "^3.1.1", diff --git a/package.json b/package.json index e86642e42..35e53a70b 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/Common/Hooks/useUrlFilters/useUrlFilters.ts b/src/Common/Hooks/useUrlFilters/useUrlFilters.ts index ce15f8fbc..183379809 100644 --- a/src/Common/Hooks/useUrlFilters/useUrlFilters.ts +++ b/src/Common/Hooks/useUrlFilters/useUrlFilters.ts @@ -79,6 +79,7 @@ const useUrlFilters = ({ initialSortKey }: UseUrlFiltersProps = { const handleSearch = (searchTerm: string) => { _updateSearchParam(SEARCH_KEY, searchTerm) + _resetPageNumber() } const handleSorting = (_sortBy: T) => {