mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Refactor #4149 - Column & TreeTable
This commit is contained in:
parent
b06f90d883
commit
ee637daf39
7 changed files with 70 additions and 15 deletions
|
@ -65,9 +65,9 @@
|
|||
></TTHeaderCell>
|
||||
</template>
|
||||
</tr>
|
||||
<tr v-if="hasColumnFilter()" v-bind="ptm('headerFilterRow')">
|
||||
<tr v-if="hasColumnFilter()" v-bind="ptm('headerRow')">
|
||||
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
|
||||
<th v-if="!columnProp(col, 'hidden')" :class="getFilterColumnHeaderClass(col)" :style="[columnProp(col, 'style'), columnProp(col, 'filterHeaderStyle')]" v-bind="ptm('headerFilterCell')">
|
||||
<th v-if="!columnProp(col, 'hidden')" :class="getFilterColumnHeaderClass(col)" :style="[columnProp(col, 'style'), columnProp(col, 'filterHeaderStyle')]" v-bind="ptm('headerCell', ptHeaderCellOptions(col))">
|
||||
<component v-if="col.children && col.children.filter" :is="col.children.filter" :column="col" :index="i" />
|
||||
</th>
|
||||
</template>
|
||||
|
@ -231,6 +231,13 @@ export default {
|
|||
columnProp(col, prop) {
|
||||
return ObjectUtils.getVNodeProp(col, prop);
|
||||
},
|
||||
ptHeaderCellOptions(column) {
|
||||
return {
|
||||
context: {
|
||||
frozen: this.columnProp(column, 'frozen')
|
||||
}
|
||||
};
|
||||
},
|
||||
onNodeToggle(node) {
|
||||
const key = node.key;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue