Fixed #987 - DataTable Column header slot does not work

pull/1021/head
Cagatay Civici 2021-02-23 15:17:57 +03:00
parent 98e2c8ed07
commit d51b1712db
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
:colspan="columnProp('colspan')" :rowspan="columnProp('rowspan')" :aria-sort="ariaSort"> :colspan="columnProp('colspan')" :rowspan="columnProp('rowspan')" :aria-sort="ariaSort">
<span class="p-column-resizer" @mousedown="onResizeStart" v-if="resizableColumns"></span> <span class="p-column-resizer" @mousedown="onResizeStart" v-if="resizableColumns"></span>
<div class="p-column-header-content"> <div class="p-column-header-content">
<component :is="col.children.header" :column="column" v-if="column.children && column.children.header"/> <component :is="column.children.header" :column="column" v-if="column.children && column.children.header"/>
<span class="p-column-title" v-if="columnProp('header')">{{columnProp('header')}}</span> <span class="p-column-title" v-if="columnProp('header')">{{columnProp('header')}}</span>
<span v-if="columnProp('sortable')" :class="sortableColumnIcon"></span> <span v-if="columnProp('sortable')" :class="sortableColumnIcon"></span>
<span v-if="isMultiSorted()" class="p-sortable-column-badge">{{getMultiSortMetaIndex() + 1}}</span> <span v-if="isMultiSorted()" class="p-sortable-column-badge">{{getMultiSortMetaIndex() + 1}}</span>
@ -172,7 +172,7 @@ export default {
}, },
computed: { computed: {
containerClass() { containerClass() {
return [this.filterColumn ? this.columnProp('headerClass') : this.columnProp('filterHeaderClass'), this.columnProp('class'), { return [this.filterColumn ? this.columnProp('filterHeaderClass') : this.columnProp('headerClass'), this.columnProp('class'), {
'p-sortable-column': this.columnProp('sortable'), 'p-sortable-column': this.columnProp('sortable'),
'p-resizable-column': this.resizableColumns, 'p-resizable-column': this.resizableColumns,
'p-highlight': this.isColumnSorted(), 'p-highlight': this.isColumnSorted(),