Add filter clear action on blank search

This fixes stale search persisting when
clearing search characters.
This commit is contained in:
CuriousCorrelation committed 2022-07-11 19:20:06 +05:30
1 parent 933fb815e7
commit 0fe220164e
1 file changed
+2
+2
View File
@@ -56,6 +56,8 @@ const FilterOptions = ({
option.label.toLowerCase().includes(value.toLowerCase())
);
setFilteredData(filteredData);
} else {
clearFilter();
}
},
[options]