diff --git a/src/components/treetable/TreeTable.vue b/src/components/treetable/TreeTable.vue index 175750b19..6413948ad 100644 --- a/src/components/treetable/TreeTable.vue +++ b/src/components/treetable/TreeTable.vue @@ -29,9 +29,15 @@ {{col.header}} - + + + @@ -360,6 +366,9 @@ export default { {'p-highlight': sorted} ]; }, + getFilterColumnHeaderClass(column) { + return ['p-filter-column', column.filterHeaderClass]; + }, isColumnSorted(column) { if (column.sortable) return this.sortMode === 'single' ? (this.d_sortField === (column.field || column.sortField)) : this.getMultiSortMetaIndex(column) > -1; @@ -733,6 +742,17 @@ export default { else { return null; } + }, + hasColumnFilter() { + if (this.columns) { + for (let col of this.columns) { + if (col.$scopedSlots.filter) { + return true; + } + } + } + + return false; } }, computed: { diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue index 2d40f1c3c..a838eaff5 100644 --- a/src/views/datatable/DataTableDoc.vue +++ b/src/views/datatable/DataTableDoc.vue @@ -202,7 +202,7 @@ export default { null Style class of the column. - + filterHeaderStyle object null diff --git a/src/views/treetable/TreeTableDoc.vue b/src/views/treetable/TreeTableDoc.vue index 9019bea5b..4cc206e7e 100644 --- a/src/views/treetable/TreeTableDoc.vue +++ b/src/views/treetable/TreeTableDoc.vue @@ -593,6 +593,18 @@ export default { null Style class of the column. + + filterHeaderStyle + object + null + Inline style of the column filter header. + + + filterHeaderClass + string + null + Style class of the column filter header. + filterMatchMode string