diff --git a/client/src/components/TagsMultiselect/HeadlessMultiselect.vue b/client/src/components/TagsMultiselect/HeadlessMultiselect.vue index 0a5528697839..6cd518e8bb73 100644 --- a/client/src/components/TagsMultiselect/HeadlessMultiselect.vue +++ b/client/src/components/TagsMultiselect/HeadlessMultiselect.vue @@ -88,7 +88,9 @@ const filteredOptions = computed(() => { /** options trimmed to `maxShownOptions` and reordered so the search value appears first */ const trimmedOptions = computed(() => { - const optionsSliced = filteredOptions.value.slice(0, props.maxShownOptions); + const optionsSliced = filteredOptions.value + .slice(0, props.maxShownOptions) + .map((tag) => tag.replace(/^name:/, "#")); // remove search value to put it in front const optionsSet = new Set(optionsSliced); diff --git a/client/src/stores/userTagsStore.ts b/client/src/stores/userTagsStore.ts index cf365d80e775..ce5b449a1554 100644 --- a/client/src/stores/userTagsStore.ts +++ b/client/src/stores/userTagsStore.ts @@ -27,7 +27,7 @@ class UserTagStoreDatabase extends Dexie { const maxDbEntriesPerUser = 10000; function normalizeTag(tag: string) { - return tag.replace(/^name:/, "#"); + return tag.replace(/^#/, "name:"); } export const useUserTagsStore = defineStore("userTagsStore", () => {