fix(table): make sorting for two-word properties work
All checks were successful
continuous-integration/drone/push Build is passing

Resolves https://community.vikunja.io/t/various-sorting-filtering-issues/2781/8
This commit is contained in:
kolaente 2024-09-13 11:03:38 +02:00
parent 8b77832af2
commit 7b873ec31c
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

@ -289,6 +289,7 @@ import type {ITask} from '@/modelTypes/ITask'
import type {IProject} from '@/modelTypes/IProject'
import AssigneeList from '@/components/tasks/partials/AssigneeList.vue'
import type {IProjectView} from '@/modelTypes/IProjectView'
import { camelCase } from 'change-case'
const props = defineProps<{
projectId: IProject['id'],
@ -355,7 +356,7 @@ function sort(property: keyof SortBy) {
function setActiveColumnsSortParam() {
sortByParam.value = Object.keys(sortBy.value)
.filter(prop => activeColumns.value[prop])
.filter(prop => activeColumns.value[camelCase(prop)])
.reduce((obj, key) => {
obj[key] = sortBy.value[key]
return obj