fix(ui): fix search input clear (#1969)

This commit is contained in:
Delirium 2024-03-18 12:12:46 +01:00 committed by GitHub
parent 8c41e6cda8
commit ba4e8a474f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,8 +88,8 @@ const AiSearchField = observer(({ edit }: Props) => {
const debounceAiFetch = React.useCallback(debounce(aiFiltersStore.getSearchFilters, 1000), []);
const onSearchChange = ({ target: { value } }: any) => {
setSearchQuery(value);
if (value !== '' && value !== searchQuery) {
setSearchQuery(value);
debounceAiFetch(value);
}
};