diff --git a/frontend/src/components/input/filter/FilterInput.vue b/frontend/src/components/input/filter/FilterInput.vue index 47e7863bc..9bf38c4b1 100644 --- a/frontend/src/components/input/filter/FilterInput.vue +++ b/frontend/src/components/input/filter/FilterInput.vue @@ -222,12 +222,22 @@ function focus() { editor.value?.commands.focus() } +function insertText(text: string) { + if (!editor.value) return + editor.value.commands.insertContent(text + ' ') + const content = editor.value.getText() + const processed = processContent(content) + lastEmittedValue = processed + emit('update:modelValue', processed) +} + onBeforeUnmount(() => { editor.value?.destroy() }) defineExpose({ focus, + insertText, }) diff --git a/frontend/src/components/input/filter/FilterQuickKeywords.vue b/frontend/src/components/input/filter/FilterQuickKeywords.vue new file mode 100644 index 000000000..8db84acb0 --- /dev/null +++ b/frontend/src/components/input/filter/FilterQuickKeywords.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/frontend/src/components/project/partials/Filters.vue b/frontend/src/components/project/partials/Filters.vue index 4ef688575..5c4d78750 100644 --- a/frontend/src/components/project/partials/Filters.vue +++ b/frontend/src/components/project/partials/Filters.vue @@ -13,6 +13,9 @@ class="mbe-2" @update:modelValue="() => change('modelValue')" /> + + +
props.modelValue, diff --git a/frontend/src/i18n/lang/en.json b/frontend/src/i18n/lang/en.json index 8af6ae590..c0242d5e0 100644 --- a/frontend/src/i18n/lang/en.json +++ b/frontend/src/i18n/lang/en.json @@ -565,6 +565,11 @@ "noResults": "No results", "fromView": "The current view has a filter set as well:", "fromViewBoth": "It will be used in combination with what you enter here.", + "keywords": { + "fields": "Fields", + "operators": "Operators", + "join": "Combine" + }, "attributes": { "title": "Title", "titlePlaceholder": "The saved filter title goes here…",