Skip to content

Commit

Permalink
Fixed #34 - TreeTable highlights unsorted columns
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Aug 19, 2019
1 parent 65bce5a commit efd2ee7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/treetable/TreeTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,20 @@ 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},
{'p-resizable-column': this.resizableColumns},
{'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;
Expand Down

0 comments on commit efd2ee7

Please sign in to comment.