mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Refactor #4149 - For DataTable & Column & ColumnGroup
This commit is contained in:
parent
dcd76d09cc
commit
97d112a2e0
13 changed files with 195 additions and 37 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<thead :class="cx('thead')" :style="sx('thead')" role="rowgroup" v-bind="columnGroup ? { ...ptm('thead'), ...getColumnGroupPT('root') } : ptm('thead')" data-pc-section="thead">
|
||||
<thead :class="cx('thead')" :style="sx('thead')" role="rowgroup" v-bind="columnGroup ? { ...ptm('thead', ptmTHeadOptions), ...getColumnGroupPT('root') } : ptm('thead', ptmTHeadOptions)" data-pc-section="thead">
|
||||
<template v-if="!columnGroup">
|
||||
<tr role="row" v-bind="ptm('headerRow')">
|
||||
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
|
||||
|
@ -244,7 +244,8 @@ export default {
|
|||
state: this.$data
|
||||
},
|
||||
context: {
|
||||
type: 'header'
|
||||
type: 'header',
|
||||
scrollable: this.$parentInstance?.$parentInstance?.scrollable
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -323,6 +324,15 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
ptmTHeadOptions() {
|
||||
return {
|
||||
context: {
|
||||
scrollable: this.$parentInstance?.$parentInstance?.scrollable
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
components: {
|
||||
DTHeaderCell: HeaderCell,
|
||||
DTHeaderCheckbox: HeaderCheckbox,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue