Fixed #34 - TreeTable highlights unsorted columns

pull/41/head
cagataycivici 2019-08-19 16:40:18 +03:00
parent 65bce5a63a
commit efd2ee77ed
1 changed files with 7 additions and 1 deletions

View File

@ -351,7 +351,7 @@ export default {
this.$emit('update:first', this.d_first);
},
getColumnHeaderClass(column) {
const sorted = this.sortMode === 'single' ? (this.d_sortField === (column.field || column.sortField)) : this.getMultiSortMetaIndex(column) > -1;
const sorted = this.isColumnSorted(column);
return [column.headerClass,
{'p-sortable-column': column.sortable},
@ -359,6 +359,12 @@ export default {
{'p-highlight': sorted}
];
},
isColumnSorted(column) {
if (column.sortable)
return this.sortMode === 'single' ? (this.d_sortField === (column.field || column.sortField)) : this.getMultiSortMetaIndex(column) > -1;
else
return false;
},
getSortableColumnIcon(column) {
let sorted = false;
let sortOrder = null;