Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: debounce for params update (#16232)

ecmadaobcba3e586d23
diff --git a/frontend/src/components/AdvancedSearch/AdvancedSearch.vue b/frontend/src/components/AdvancedSearch/AdvancedSearch.vue
index 2496786982..50d72c4d6c 100644
--- a/frontend/src/components/AdvancedSearch/AdvancedSearch.vue
+++ b/frontend/src/components/AdvancedSearch/AdvancedSearch.vue
@@ -484,14 +484,17 @@ const maybeEmitIncompleteValue = () => {
if (inputText.value !== `${state.currentScope}:`) {
const updated = cloneDeep(props.params);
updated.query = inputText.value;
- emit("update:params", updated);
+ updateParams(updated);
}
};
+const updateParams = useDebounceFn((params: SearchParams) => {
+ emit("update:params", params);
+}, DEBOUNCE_SEARCH_DELAY * 2);
+
const handleInputClick = () => {
maybeSelectMatchedScope();
maybeDeselectMismatchedScope();
- maybeEmitIncompleteValue();
};
const handleKeyDown = (e: KeyboardEvent) => {