chore: empty query text (#566)

This commit is contained in:
Zeng1998 2022-11-25 20:09:42 +08:00 committed by GitHub
parent 2daf085ce4
commit ff0db82dc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ const SearchBar = () => {
const handleTextQueryInput = (event: React.FormEvent<HTMLInputElement>) => {
const text = event.currentTarget.value;
setQueryText(text);
locationService.setTextQuery(text);
locationService.setTextQuery(text.length === 0 ? undefined : text);
};
return (