1
0

fix(filters): label highlighting and autocomplete fields now work with in operator

Previously, when creating a filter query with the 'in' operator and multiple values, autocompletion and highlighting was not available. This change now implements a split for each value, seperated by a comma.
This commit is contained in:
kolaente
2024-03-11 15:41:06 +01:00
parent 0529f30e77
commit dbfe162cd2
5 changed files with 39 additions and 17 deletions

View File

@ -57,6 +57,12 @@ export const useLabelStore = defineStore('label', () => {
.values(labels.value)
.filter(({title}) => labelTitles.some(l => l.toLowerCase() === title.toLowerCase()))
})
const getLabelByExactTitle = computed(() => {
return (labelTitle: string) => Object
.values(labels.value)
.find(l => l.title.toLowerCase() === labelTitle.toLowerCase())
})
function setIsLoading(newIsLoading: boolean) {
@ -145,6 +151,7 @@ export const useLabelStore = defineStore('label', () => {
getLabelById,
filterLabelsByQuery,
getLabelsByExactTitles,
getLabelByExactTitle,
setLabels,
setLabel,