ui: fix autocomplete double fetch

This commit is contained in:
nick-delirium 2025-02-11 17:09:19 +01:00
parent 7da11341cf
commit 198c5e3a92
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 6 additions and 2 deletions

View file

@ -254,7 +254,9 @@ export function AutoCompleteContainer(props: Props) {
event.target === event.currentTarget ||
event.currentTarget.contains(event.target as Node)
) {
setShowValueModal(true);
setTimeout(() => {
setShowValueModal(true);
}, 0)
}
};

View file

@ -80,7 +80,9 @@ const FilterAutoComplete = observer(
}
}, [topValues, initialFocus]);
useEffect(() => { void loadTopValues() }, [_params.type]);
useEffect(() => {
void loadTopValues()
}, [_params.type]);
const loadOptions = async (
inputValue: string,