#6151: refactor the TableHeader template so it renders filters when columnGroup is set
parent
6e55ee9514
commit
4e2899254b
|
@ -43,6 +43,40 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<tr v-for="(row, i) of getHeaderRows()" :key="i" role="row" v-bind="{ ...ptm('headerRow'), ...getRowPT(row, 'root', i) }">
|
||||||
|
<template v-for="(col, j) of getHeaderColumns(row)" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || j">
|
||||||
|
<DTHeaderCell
|
||||||
|
v-if="!columnProp(col, 'hidden') && (rowGroupMode !== 'subheader' || groupRowsBy !== columnProp(col, 'field')) && typeof col.children !== 'string'"
|
||||||
|
:column="col"
|
||||||
|
@column-click="$emit('column-click', $event)"
|
||||||
|
@column-mousedown="$emit('column-mousedown', $event)"
|
||||||
|
:groupRowsBy="groupRowsBy"
|
||||||
|
:groupRowSortField="groupRowSortField"
|
||||||
|
:sortMode="sortMode"
|
||||||
|
:sortField="sortField"
|
||||||
|
:sortOrder="sortOrder"
|
||||||
|
:multiSortMeta="multiSortMeta"
|
||||||
|
:allRowsSelected="allRowsSelected"
|
||||||
|
:empty="empty"
|
||||||
|
@checkbox-change="$emit('checkbox-change', $event)"
|
||||||
|
:filters="filters"
|
||||||
|
:filterDisplay="filterDisplay"
|
||||||
|
:filtersStore="filtersStore"
|
||||||
|
@filter-change="$emit('filter-change', $event)"
|
||||||
|
@filter-apply="$emit('filter-apply')"
|
||||||
|
@operator-change="$emit('operator-change', $event)"
|
||||||
|
@matchmode-change="$emit('matchmode-change', $event)"
|
||||||
|
@constraint-add="$emit('constraint-add', $event)"
|
||||||
|
@constraint-remove="$emit('constraint-remove', $event)"
|
||||||
|
@apply-click="$emit('apply-click', $event)"
|
||||||
|
:unstyled="unstyled"
|
||||||
|
:pt="pt"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
<tr v-if="filterDisplay === 'row'" role="row" v-bind="ptm('headerRow')">
|
<tr v-if="filterDisplay === 'row'" role="row" v-bind="ptm('headerRow')">
|
||||||
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
|
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
|
||||||
<th
|
<th
|
||||||
|
@ -94,40 +128,6 @@
|
||||||
</th>
|
</th>
|
||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<tr v-for="(row, i) of getHeaderRows()" :key="i" role="row" v-bind="{ ...ptm('headerRow'), ...getRowPT(row, 'root', i) }">
|
|
||||||
<template v-for="(col, j) of getHeaderColumns(row)" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || j">
|
|
||||||
<DTHeaderCell
|
|
||||||
v-if="!columnProp(col, 'hidden') && (rowGroupMode !== 'subheader' || groupRowsBy !== columnProp(col, 'field')) && typeof col.children !== 'string'"
|
|
||||||
:column="col"
|
|
||||||
@column-click="$emit('column-click', $event)"
|
|
||||||
@column-mousedown="$emit('column-mousedown', $event)"
|
|
||||||
:groupRowsBy="groupRowsBy"
|
|
||||||
:groupRowSortField="groupRowSortField"
|
|
||||||
:sortMode="sortMode"
|
|
||||||
:sortField="sortField"
|
|
||||||
:sortOrder="sortOrder"
|
|
||||||
:multiSortMeta="multiSortMeta"
|
|
||||||
:allRowsSelected="allRowsSelected"
|
|
||||||
:empty="empty"
|
|
||||||
@checkbox-change="$emit('checkbox-change', $event)"
|
|
||||||
:filters="filters"
|
|
||||||
:filterDisplay="filterDisplay"
|
|
||||||
:filtersStore="filtersStore"
|
|
||||||
@filter-change="$emit('filter-change', $event)"
|
|
||||||
@filter-apply="$emit('filter-apply')"
|
|
||||||
@operator-change="$emit('operator-change', $event)"
|
|
||||||
@matchmode-change="$emit('matchmode-change', $event)"
|
|
||||||
@constraint-add="$emit('constraint-add', $event)"
|
|
||||||
@constraint-remove="$emit('constraint-remove', $event)"
|
|
||||||
@apply-click="$emit('apply-click', $event)"
|
|
||||||
:unstyled="unstyled"
|
|
||||||
:pt="pt"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</tr>
|
|
||||||
</template>
|
|
||||||
</thead>
|
</thead>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue