mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-31 07:02:03 +08:00
fix: cursor resetting in dropdown causing wrong query selection (#5063)
This commit is contained in:
parent
93babc3019
commit
da74619a46
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user