Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix debouncer issue

Abhinav883bea8baa86
diff --git a/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx b/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
index 8b46f51ae7..5cfa4cdc66 100644
--- a/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
+++ b/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
@@ -96,9 +96,12 @@ export default function SearchInput(props: Iprops) {
}
};
- const getOptions = pDebounce(
- getAutoCompleteSuggestions(props.files, props.collections),
- 250
+ const getOptions = useCallback(
+ pDebounce(
+ getAutoCompleteSuggestions(props.files, props.collections),
+ 250
+ ),
+ [props.files, props.collections]
);
const blur = () => {