Skip to content

Commit

Permalink
fixes #548 - use min-width, max-width, width for column width
Browse files Browse the repository at this point in the history
  • Loading branch information
xaksis committed May 27, 2019
1 parent bc13a5b commit 167b344
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default {
{
label: 'Name',
field: 'name',
width: '200px',
filterOptions: {
enabled: true,
placeholder: 'All',
Expand Down
4 changes: 4 additions & 0 deletions src/components/VgtTableHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
}
Expand All @@ -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
Expand Down

0 comments on commit 167b344

Please sign in to comment.