From a7f114895417b8eb55c11ca1ed47644e0159c87e Mon Sep 17 00:00:00 2001 From: selankon Date: Wed, 5 Jun 2024 09:28:30 -0500 Subject: [PATCH] Refactor searchOnChange MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Òscar Casajuana --- src/components/Organizations/OrganizationsList.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/Organizations/OrganizationsList.tsx b/src/components/Organizations/OrganizationsList.tsx index 8e6f27e..bb6eab2 100644 --- a/src/components/Organizations/OrganizationsList.tsx +++ b/src/components/Organizations/OrganizationsList.tsx @@ -26,11 +26,15 @@ export const OrganizationsFilter = () => { navigate(getPath()) }, 1000) - const searchOnChange = (event: any) => { - debouncedSearch(event.target.value) - } - - return + return ( + ) => { + debouncedSearch(event.target.value) + }} + /> + ) } export const PaginatedOrganizationsList = () => {