1
0

fix(table): make sorting for two-word properties work

Resolves https://community.vikunja.io/t/various-sorting-filtering-issues/2781/8

(cherry picked from commit 7b873ec31c8ea93da131e1965397f343019d2da0)
This commit is contained in:
kolaente 2024-09-13 11:03:38 +02:00
parent 7f28a514ea
commit 19a1dc9daf
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B

View File

@ -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