mirror of
https://github.com/jlengrand/signoz.git
synced 2026-03-10 08:41:20 +00:00
fix: cursor resetting in dropdown causing wrong query selection (#5063)
This commit is contained in:
@@ -126,6 +126,7 @@ export const useAutoComplete = (
|
||||
isExist,
|
||||
results,
|
||||
result,
|
||||
isFetching,
|
||||
whereClauseConfig,
|
||||
);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ export const useOptions = (
|
||||
isExist: boolean,
|
||||
results: string[],
|
||||
result: string[],
|
||||
isFetching: boolean,
|
||||
whereClauseConfig?: WhereClauseConfig,
|
||||
): Option[] => {
|
||||
const [options, setOptions] = useState<Option[]>([]);
|
||||
@@ -138,6 +139,9 @@ export const useOptions = (
|
||||
if (newOptions.length > 0) {
|
||||
setOptions(newOptions);
|
||||
}
|
||||
if (isFetching) {
|
||||
setOptions([]);
|
||||
}
|
||||
}, [
|
||||
whereClauseConfig,
|
||||
getKeyOpValue,
|
||||
@@ -154,6 +158,7 @@ export const useOptions = (
|
||||
searchValue,
|
||||
getKeyOperatorOptions,
|
||||
getOptionsWithValidOperator,
|
||||
isFetching,
|
||||
]);
|
||||
|
||||
return useMemo(
|
||||
|
||||
Reference in New Issue
Block a user