diff --git a/packages/primevue/src/datatable/FilterHeaderCell.vue b/packages/primevue/src/datatable/FilterHeaderCell.vue new file mode 100644 index 000000000..fba8e51dc --- /dev/null +++ b/packages/primevue/src/datatable/FilterHeaderCell.vue @@ -0,0 +1,190 @@ + + + diff --git a/packages/primevue/src/datatable/TableHeader.vue b/packages/primevue/src/datatable/TableHeader.vue index a52c4f424..ee6529ed8 100755 --- a/packages/primevue/src/datatable/TableHeader.vue +++ b/packages/primevue/src/datatable/TableHeader.vue @@ -79,53 +79,28 @@ @@ -135,9 +110,8 @@ import BaseComponent from '@primevue/core/basecomponent'; import { HelperSet, getVNodeProp } from '@primevue/core/utils'; import { mergeProps } from 'vue'; -import ColumnFilter from './ColumnFilter.vue'; +import FilterHeaderCell from './FilterHeaderCell.vue'; import HeaderCell from './HeaderCell.vue'; -import HeaderCheckbox from './HeaderCheckbox.vue'; export default { name: 'TableHeader', @@ -338,8 +312,7 @@ export default { }, components: { DTHeaderCell: HeaderCell, - DTHeaderCheckbox: HeaderCheckbox, - DTColumnFilter: ColumnFilter + DTFilterHeaderCell: FilterHeaderCell } }; diff --git a/packages/primevue/src/datatable/style/DataTableStyle.js b/packages/primevue/src/datatable/style/DataTableStyle.js index 34d1b3ca8..525db9d6b 100644 --- a/packages/primevue/src/datatable/style/DataTableStyle.js +++ b/packages/primevue/src/datatable/style/DataTableStyle.js @@ -620,11 +620,11 @@ const classes = { ], thead: 'p-datatable-thead', headerCell: ({ instance, props, column }) => - column && !instance.columnProp(column, 'hidden') && (props.rowGroupMode !== 'subheader' || props.groupRowsBy !== instance.columnProp(column, 'field')) + column && !instance.columnProp('hidden') && (props.rowGroupMode !== 'subheader' || props.groupRowsBy !== instance.columnProp(column, 'field')) ? [ 'p-datatable-header-cell', { - 'p-datatable-frozen-column': instance.columnProp(column, 'frozen') + 'p-datatable-frozen-column': instance.columnProp('frozen') } ] : [ @@ -653,7 +653,7 @@ const classes = { filterElementContainer: 'p-datatable-filter-element-container', pcColumnFilterButton: 'p-datatable-column-filter-button', pcColumnFilterClearButton: 'p-datatable-column-filter-clear-button', - filterOverlay: ({ instance, props }) => [ + filterOverlay: ({ props }) => [ 'p-datatable-filter-overlay p-component', { 'p-datatable-filter-overlay-popover': props.display === 'menu'