From 0fe220164e604ea5d444d683422ed3cfc50be8c4 Mon Sep 17 00:00:00 2001 From: CuriousCorrelation Date: Mon, 11 Jul 2022 19:20:06 +0530 Subject: [PATCH] Add filter clear action on blank search This fixes stale search persisting when clearing search characters. --- app/components/FilterOptions.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/FilterOptions.tsx b/app/components/FilterOptions.tsx index be581e2539..c9eefdca1d 100644 --- a/app/components/FilterOptions.tsx +++ b/app/components/FilterOptions.tsx @@ -56,6 +56,8 @@ const FilterOptions = ({ option.label.toLowerCase().includes(value.toLowerCase()) ); setFilteredData(filteredData); + } else { + clearFilter(); } }, [options]