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:
@ -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,
|
||||
|
Reference in New Issue
Block a user