fix(filter): correctly replace project title in filter query
Resolves https://community.vikunja.io/t/filter-option-to-exclude-a-tag-project-etc/1523/6
This commit is contained in:
parent
ca0de680ad
commit
22dcedcd7d
@ -211,9 +211,9 @@ function handleFieldInput() {
|
|||||||
|
|
||||||
function autocompleteSelect(value) {
|
function autocompleteSelect(value) {
|
||||||
filterQuery.value = filterQuery.value.substring(0, autocompleteMatchPosition.value + 1) +
|
filterQuery.value = filterQuery.value.substring(0, autocompleteMatchPosition.value + 1) +
|
||||||
(autocompleteResultType.value === 'labels'
|
(autocompleteResultType.value === 'assignees'
|
||||||
? value.title
|
? value.username
|
||||||
: value.username) +
|
: value.title) +
|
||||||
filterQuery.value.substring(autocompleteMatchPosition.value + autocompleteMatchText.value.length + 1)
|
filterQuery.value.substring(autocompleteMatchPosition.value + autocompleteMatchText.value.length + 1)
|
||||||
|
|
||||||
autocompleteResults.value = []
|
autocompleteResults.value = []
|
||||||
|
@ -88,7 +88,7 @@ watchDebounced(
|
|||||||
val.filter = transformFilterStringFromApi(
|
val.filter = transformFilterStringFromApi(
|
||||||
val?.filter || '',
|
val?.filter || '',
|
||||||
labelId => labelStore.getLabelById(labelId)?.title,
|
labelId => labelStore.getLabelById(labelId)?.title,
|
||||||
projectId => projectStore.projects.value[projectId]?.title || null,
|
projectId => projectStore.projects[projectId]?.title || null,
|
||||||
)
|
)
|
||||||
params.value = val
|
params.value = val
|
||||||
},
|
},
|
||||||
|
@ -33,6 +33,7 @@ export const AVAILABLE_FILTER_FIELDS = [
|
|||||||
...DATE_FIELDS,
|
...DATE_FIELDS,
|
||||||
...ASSIGNEE_FIELDS,
|
...ASSIGNEE_FIELDS,
|
||||||
...LABEL_FIELDS,
|
...LABEL_FIELDS,
|
||||||
|
...PROJECT_FIELDS,
|
||||||
]
|
]
|
||||||
|
|
||||||
export const FILTER_OPERATORS = [
|
export const FILTER_OPERATORS = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user