Skip to content

armgit / ente

Public Imported from GitHub
0

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

Subscribe SearchInput to people state for dropdown reactivity

Anand Baburajan7ee5bd5b7384
diff --git a/web/packages/new/photos/components/SearchBar.tsx b/web/packages/new/photos/components/SearchBar.tsx
index 0d364859bf..48c05b0d97 100644
--- a/web/packages/new/photos/components/SearchBar.tsx
+++ b/web/packages/new/photos/components/SearchBar.tsx
@@ -162,6 +162,9 @@ const SearchInput: React.FC<Omit<SearchBarProps, "onShowSearchInput">> = ({
}) => {
// A ref to the top level Select.
const selectRef = useRef<SelectInstance<SearchOption> | null>(null);
+ // Subscribe to people state so that we re-render when people data arrives.
+ // This is needed because shouldShowEmptyState reads peopleStateSnapshot().
+ usePeopleStateSnapshot();
// The currently selected option.
//
// We need to use `null` instead of `undefined` to indicate missing values,