Refactor #4024 - For DataTable

This commit is contained in:
Tuğçe Küçükoğlu 2023-06-05 16:49:36 +03:00
parent 9cb888b6a0
commit 3f14493571
2 changed files with 6 additions and 6 deletions

View file

@ -597,7 +597,7 @@ export interface DataTablePassThroughOptions {
/** /**
* Uses to pass attributes to the rowgroup header's DOM element. * Uses to pass attributes to the rowgroup header's DOM element.
*/ */
rowgroupHeader?: DataTablePassThroughOptionType; rowGroupHeader?: DataTablePassThroughOptionType;
/** /**
* Uses to pass attributes to the body row's DOM element. * Uses to pass attributes to the body row's DOM element.
*/ */
@ -609,7 +609,7 @@ export interface DataTablePassThroughOptions {
/** /**
* Uses to pass attributes to the rowgroup footer's DOM element. * Uses to pass attributes to the rowgroup footer's DOM element.
*/ */
rowgroupFooter?: DataTablePassThroughOptionType; rowGroupFooter?: DataTablePassThroughOptionType;
/** /**
* Uses to pass attributes to the empty message's DOM element. * Uses to pass attributes to the empty message's DOM element.
*/ */

View file

@ -5,10 +5,10 @@
<tr <tr
v-if="templates['groupheader'] && rowGroupMode === 'subheader' && shouldRenderRowGroupHeader(value, rowData, getRowIndex(index))" v-if="templates['groupheader'] && rowGroupMode === 'subheader' && shouldRenderRowGroupHeader(value, rowData, getRowIndex(index))"
:key="getRowKey(rowData, getRowIndex(index)) + '_subheader'" :key="getRowKey(rowData, getRowIndex(index)) + '_subheader'"
:class="cx('rowgroupHeader')" :class="cx('rowGroupHeader')"
:style="rowGroupHeaderStyle" :style="rowGroupHeaderStyle"
role="row" role="row"
v-bind="ptm('rowgroupHeader')" v-bind="ptm('rowGroupHeader')"
> >
<td :colspan="columnsLength - 1" v-bind="{ ...getColumnPT('root'), ...getColumnPT('bodyCell') }"> <td :colspan="columnsLength - 1" v-bind="{ ...getColumnPT('root'), ...getColumnPT('bodyCell') }">
<button v-if="expandableRowGroups" :class="cx('rowGroupToggler')" @click="onRowGroupToggle($event, rowData)" type="button" v-bind="getColumnPT('rowGroupToggler')"> <button v-if="expandableRowGroups" :class="cx('rowGroupToggler')" @click="onRowGroupToggle($event, rowData)" type="button" v-bind="getColumnPT('rowGroupToggler')">
@ -98,9 +98,9 @@
<tr <tr
v-if="templates['groupfooter'] && rowGroupMode === 'subheader' && shouldRenderRowGroupFooter(value, rowData, getRowIndex(index))" v-if="templates['groupfooter'] && rowGroupMode === 'subheader' && shouldRenderRowGroupFooter(value, rowData, getRowIndex(index))"
:key="getRowKey(rowData, getRowIndex(index)) + '_subfooter'" :key="getRowKey(rowData, getRowIndex(index)) + '_subfooter'"
:class="cx('rowgroupFooter')" :class="cx('rowGroupFooter')"
role="row" role="row"
v-bind="ptm('rowgroupFooter')" v-bind="ptm('rowGroupFooter')"
> >
<td :colspan="columnsLength - 1" v-bind="{ ...getColumnPT('root'), ...getColumnPT('bodyCell') }"> <td :colspan="columnsLength - 1" v-bind="{ ...getColumnPT('root'), ...getColumnPT('bodyCell') }">
<component :is="templates['groupfooter']" :data="rowData" :index="getRowIndex(index)" /> <component :is="templates['groupfooter']" :data="rowData" :index="getRowIndex(index)" />