diff --git a/src/modules/main/partials/editViewPartials/sort/SortForm.vue b/src/modules/main/partials/editViewPartials/sort/SortForm.vue index d6eda378e..8bdd4d558 100644 --- a/src/modules/main/partials/editViewPartials/sort/SortForm.vue +++ b/src/modules/main/partials/editViewPartials/sort/SortForm.vue @@ -24,7 +24,7 @@
@@ -110,9 +110,9 @@ export default { isSameEntry(object, searchObject) { return Object.keys(searchObject).every((key) => object[key] === searchObject[key]) }, - unusedColumns(selectedId) { - if (this.hadHiddenSortingRules || !this.viewSort) return this.columns - return this.columns.filter(col => !this.viewSort.map(entry => entry.columnId).includes(col.id) || col.id === selectedId) + eligibleColumns(selectedId) { // filter sortable and unused columns + if (this.hadHiddenSortingRules || !this.viewSort) return this.columns?.filter(col => col.canSort()) + return this.columns.filter(col => col.canSort() && (!this.viewSort.map(entry => entry.columnId).includes(col.id) || col.id === selectedId)) }, deleteSortingRule(index) { this.mutableSort.splice(index, 1) diff --git a/src/modules/main/sections/MainWrapper.vue b/src/modules/main/sections/MainWrapper.vue index ac1624686..76300250c 100644 --- a/src/modules/main/sections/MainWrapper.vue +++ b/src/modules/main/sections/MainWrapper.vue @@ -112,7 +112,7 @@ export default { this.viewSetting = {} if (this.isView && this.element?.sort?.length) { - this.viewSetting.sorting = [...this.element.sort] + this.viewSetting.presetSorting = [...this.element.sort] } await this.$store.dispatch('loadColumnsFromBE', { diff --git a/src/shared/components/ncTable/partials/TableHeaderColumnOptions.vue b/src/shared/components/ncTable/partials/TableHeaderColumnOptions.vue index d53da20d1..60ebe1e1e 100644 --- a/src/shared/components/ncTable/partials/TableHeaderColumnOptions.vue +++ b/src/shared/components/ncTable/partials/TableHeaderColumnOptions.vue @@ -56,8 +56,8 @@