Skip to content

armgit / ente

Public Imported from GitHub
0

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

[web] Clear search bar state when value is falsey

Manav Rathid7b0beb949a8
diff --git a/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx b/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
index 4e9552a1df..d7cf151e66 100644
--- a/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
+++ b/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx
@@ -56,10 +56,8 @@ export default function SearchInput(props: Iprops) {
const [value, setValue] = useState<SearchOption>(null);
const appContext = useContext(AppContext);
const handleChange = (value: SearchOption) => {
- if (value) {
- setValue(value);
- setQuery(value.label);
- }
+ setValue(value);
+ setQuery(value?.label);
blur();
};