diff --git a/dev/App.vue b/dev/App.vue index 127b6d90..7e241611 100644 --- a/dev/App.vue +++ b/dev/App.vue @@ -60,6 +60,7 @@ export default { { label: 'Name', field: 'name', + width: '200px', filterOptions: { enabled: true, placeholder: 'All', diff --git a/src/components/VgtTableHeader.vue b/src/components/VgtTableHeader.vue index 1339f3eb..dea60824 100644 --- a/src/components/VgtTableHeader.vue +++ b/src/components/VgtTableHeader.vue @@ -196,6 +196,8 @@ export default { colStyles.push(this.getWidthStyle(cell)); } else { colStyles.push({ + minWidth: this.columns[i].width ? this.columns[i].width : 'auto', + maxWidth: this.columns[i].width ? this.columns[i].width : 'auto', width: this.columns[i].width ? this.columns[i].width : 'auto', }); } @@ -206,6 +208,8 @@ export default { getColumnStyle(column, index) { const styleObject = { + minWidth: column.width ? column.width : 'auto', + maxWidth: column.width ? column.width : 'auto', width: column.width ? column.width : 'auto', }; //* if fixed header we need to get width from original table