diff --git a/packages/primevue/scripts/components/column.js b/packages/primevue/scripts/components/column.js index 7018f8ae5..0ffb0895e 100644 --- a/packages/primevue/scripts/components/column.js +++ b/packages/primevue/scripts/components/column.js @@ -29,6 +29,12 @@ const ColumnProps = [ default: 'false', description: 'Defines if a column is sortable.' }, + { + name: 'resizable', + type: 'boolean', + default: 'false', + description: 'Defines if a column is resizable despite being frozen or other table columns not so.' + }, { name: 'header', type: 'any', diff --git a/packages/primevue/src/column/BaseColumn.vue b/packages/primevue/src/column/BaseColumn.vue index 045400038..78e026292 100644 --- a/packages/primevue/src/column/BaseColumn.vue +++ b/packages/primevue/src/column/BaseColumn.vue @@ -30,6 +30,10 @@ export default { type: Boolean, default: false }, + resizable: { + type: Boolean, + default: false + }, header: { type: null, default: null diff --git a/packages/primevue/src/column/Column.d.ts b/packages/primevue/src/column/Column.d.ts index 59dc716f4..877190a2c 100755 --- a/packages/primevue/src/column/Column.d.ts +++ b/packages/primevue/src/column/Column.d.ts @@ -379,6 +379,11 @@ export interface ColumnProps { * @defaultValue false */ sortable?: boolean | undefined; + /** + * Defines if a column is resizable when not all columns are. + * @defaultValue false + */ + resizable?: boolean | undefined; /** * Header content of the column. */ diff --git a/packages/primevue/src/datatable/HeaderCell.vue b/packages/primevue/src/datatable/HeaderCell.vue index a8026d5f4..16708e9bb 100644 --- a/packages/primevue/src/datatable/HeaderCell.vue +++ b/packages/primevue/src/datatable/HeaderCell.vue @@ -16,13 +16,13 @@ @drop="onDrop" v-bind="{ ...getColumnPT('root'), ...getColumnPT('headerCell') }" :data-p-sortable-column="columnProp('sortable')" - :data-p-resizable-column="resizableColumns" + :data-p-resizable-column="isResizable" :data-p-sorted="isColumnSorted()" :data-p-filter-column="filterColumn" :data-p-frozen-column="columnProp('frozen')" :data-p-reorderable-column="reorderableColumns" > - +