fix(filters): clear autocomplete results when starting the next character
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2024-03-14 09:05:07 +01:00
parent 6cf3a578c0
commit 96186250f4
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 0 deletions

View File

@ -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')