Allow sorting by calculation columns

This commit is contained in:
Andrew Kingston 2024-10-11 16:38:35 +01:00
parent 516f45e8ad
commit 865eb3169f
No known key found for this signature in database
1 changed files with 6 additions and 6 deletions

View File

@ -4,24 +4,24 @@ export function canBeDisplayColumn(column) {
if (!sharedCore.canBeDisplayColumn(column.type)) {
return false
}
// If it's a related column (only available in the frontend), don't allow using it as display column
if (column.related) {
// If it's a related column (only available in the frontend), don't allow using it as display column
return false
}
return true
}
export function canBeSortColumn(column) {
// Allow sorting by calculation columns
if (column.calculationType) {
return true
}
if (!sharedCore.canBeSortColumn(column.type)) {
return false
}
// If it's a related column (only available in the frontend), don't allow using it as display column
if (column.related) {
// If it's a related column (only available in the frontend), don't allow using it as display column
return false
}
return true
}