From 96186250f479684a1f1d2fc86fd09c1c5a4a5356 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 14 Mar 2024 09:05:07 +0100 Subject: [PATCH] fix(filters): clear autocomplete results when starting the next character --- frontend/src/components/project/partials/FilterInput.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/project/partials/FilterInput.vue b/frontend/src/components/project/partials/FilterInput.vue index a3139b3f0..7fd965711 100644 --- a/frontend/src/components/project/partials/FilterInput.vue +++ b/frontend/src/components/project/partials/FilterInput.vue @@ -189,6 +189,7 @@ const projectStore = useProjectStore() function handleFieldInput() { const cursorPosition = filterInput.value.selectionStart const textUpToCursor = filterQuery.value.substring(0, cursorPosition) + autocompleteResults.value = [] AUTOCOMPLETE_FIELDS.forEach(field => { const pattern = new RegExp('(' + field + '\\s*' + FILTER_OPERATORS_REGEX + '\\s*)([\'"]?)([^\'"&|()]+\\1?)?$', 'ig')