diff --git a/src/components/datatable/DataTable.d.ts b/src/components/datatable/DataTable.d.ts
index 0651560a7..6920c7d3d 100644
--- a/src/components/datatable/DataTable.d.ts
+++ b/src/components/datatable/DataTable.d.ts
@@ -32,11 +32,14 @@ export declare class DataTable extends Vue {
csvSeparator?: string;
exportFilename?: string;
autoLayout?: boolean;
+ resizableColumns?: boolean;
+ columnResizeMode?: string;
$emit(eventName: 'page', event: Event): this;
$emit(eventName: 'sort', event: Event): this;
$emit(eventName: 'filter', event: Event): this;
$emit(eventName: 'row-select', event: Event): this;
$emit(eventName: 'row-unselect', event: Event): this;
+ $emit(eventName: 'column-resize-end', event: Event): this;
$slots: {
header: VNode[];
paginatorLeft: VNode[];
diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue
index 2b6a89d2a..62d79c235 100644
--- a/src/components/datatable/DataTable.vue
+++ b/src/components/datatable/DataTable.vue
@@ -20,10 +20,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue
index e38aa425d..c36067582 100644
--- a/src/views/datatable/DataTableDoc.vue
+++ b/src/views/datatable/DataTableDoc.vue
@@ -532,6 +532,34 @@ data() {
<Column field="color" header="Color"></Column>
</DataTable>
+
+
+
+
+
+
+
+ DataTable - Column Resize+Columns can be resized using drag drop by setting the resizableColumns to true. There are two resize modes; "fit" and "expand". Fit is the default one and the overall table width does not change when a column is resized. + In "expand" mode, table width also changes along with the column width. onColumnResize is a callback that passes the resized column header as a parameter. +
+
+
+ Fit Mode+Expand Mode+
+
+ Column Resize+Columns can be resized using drag drop by setting the resizableColumns to true. There are two resize modes; "fit" and "expand". Fit is the default one and the overall table width does not change when a column is resized. + In "expand" mode, table width also changes along with the column width. column-resize-end is a callback that passes the resized column header and delta change as a parameter. +It is important to note that when you need to change column widths, since table width is 100%, giving fixed pixel widths does not work well as browsers scale them, instead give percentage widths. +Data Export@@ -918,6 +946,18 @@ export default { | false | Whether the cell widths scale according to their content or not. | |
---|---|---|---|
resizableColumns | +boolean | +false | +When enabled, columns can be resized using drag and drop. | +
columnResizeMode | +string | +fit | +Defines whether the overall table width should change on column resize, valid values are "fit" and "expand". |
+