Fix type issues (#4176)

This commit is contained in:
InfiniteStash
2023-10-16 05:34:54 +02:00
committed by GitHub
parent 90dfaf668b
commit 409f8fc70c
17 changed files with 41 additions and 86 deletions

View File

@@ -107,7 +107,7 @@ export const ListFilter: React.FC<IListFilterProps> = ({
// clear search input when filter is cleared
useEffect(() => {
if (!filter.searchTerm) {
queryRef.current.value = "";
if (queryRef.current) queryRef.current.value = "";
setQueryClearShowing(false);
}
}, [filter.searchTerm, queryRef]);
@@ -139,7 +139,7 @@ export const ListFilter: React.FC<IListFilterProps> = ({
}
function onClearQuery() {
queryRef.current.value = "";
if (queryRef.current) queryRef.current.value = "";
searchQueryUpdated("");
setQueryFocus();
setQueryClearShowing(false);