From 6fbd24d5f604e3f5449373f58a0fd04785569601 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 6 Apr 2024 12:08:41 +0200 Subject: [PATCH] fix(filter): move spaces out of button to after the matched filter value to prevent removal of spaces --- .../src/components/project/partials/FilterInput.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/project/partials/FilterInput.vue b/frontend/src/components/project/partials/FilterInput.vue index b584fa422..5e463a2e2 100644 --- a/frontend/src/components/project/partials/FilterInput.vue +++ b/frontend/src/components/project/partials/FilterInput.vue @@ -91,7 +91,15 @@ const highlightedFilterQuery = computed(() => { value = '' } - return `${o}${spacesBefore}${token}${spacesAfter}${value}` + let endPadding = '' + if(value.endsWith(' ')) { + const fullLength = value.length + value = value.trimEnd() + const numberOfRemovedSpaces = fullLength - value.length + endPadding = endPadding.padEnd(numberOfRemovedSpaces, ' ') + } + + return `${o}${spacesBefore}${token}${spacesAfter}${value}${endPadding}` }) }) ASSIGNEE_FIELDS