fix(filter): move spaces out of button to after the matched filter value to prevent removal of spaces
continuous-integration/drone/push Build is failing Details

This commit is contained in:
kolaente 2024-04-06 12:08:41 +02:00
parent e534a6a5bf
commit 6fbd24d5f6
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 1 deletions

View File

@ -91,7 +91,15 @@ const highlightedFilterQuery = computed(() => {
value = ''
}
return `${o}${spacesBefore}${token}${spacesAfter}<button class="is-primary filter-query__date_value" data-position="${position}">${value}</button><span class="filter-query__date_value_placeholder">${value}</span>`
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}<button class="is-primary filter-query__date_value" data-position="${position}">${value}</button><span class="filter-query__date_value_placeholder">${value}</span>${endPadding}`
})
})
ASSIGNEE_FIELDS