fix(filters): correctly replace values when clicking on an autocomplete result
Related https://kolaente.dev/vikunja/vikunja/issues/2194
This commit is contained in:
parent
c8b35d49ca
commit
6cf3a578c0
@ -222,7 +222,7 @@ function handleFieldInput() {
|
|||||||
autocompleteResults.value = projectStore.searchProject(search)
|
autocompleteResults.value = projectStore.searchProject(search)
|
||||||
}
|
}
|
||||||
autocompleteMatchText.value = keyword
|
autocompleteMatchText.value = keyword
|
||||||
autocompleteMatchPosition.value = prefix.length - 1 + keyword.replace(search, '').length
|
autocompleteMatchPosition.value = match.index + prefix.length - 1 + keyword.replace(search, '').length
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -107,6 +107,16 @@ describe('Filter Transformation', () => {
|
|||||||
|
|
||||||
expect(transformed).toBe('project = 1')
|
expect(transformed).toBe('project = 1')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should resolve project and labels independently', () => {
|
||||||
|
const transformed = transformFilterStringForApi(
|
||||||
|
'project = lorem && labels = ipsum',
|
||||||
|
multipleDummyResolver,
|
||||||
|
multipleDummyResolver,
|
||||||
|
)
|
||||||
|
|
||||||
|
expect(transformed).toBe('project = 1 && labels = 2')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('To API', () => {
|
describe('To API', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user