Skip to content

Commit

Permalink
Fixed #1178 - DataTable state restoring seems broken for columnOrder …
Browse files Browse the repository at this point in the history
…and columnWidths
  • Loading branch information
mertsincan committed May 16, 2021
1 parent 2b9a2de commit 1034859
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/datatable/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ export default {
if (this.responsiveLayout === 'stack' && !this.scrollable) {
this.createResponsiveStyle();
}
if (this.isStateful() && this.resizableColumns) {
this.restoreColumnWidths();
}
},
beforeUnmount() {
this.unbindColumnResizeEvents();
Expand All @@ -400,11 +404,6 @@ export default {
updated() {
if (this.isStateful()) {
this.saveState();
if (this.resizableColumns && !this.columnWidthsRestored) {
this.restoreColumnWidths();
this.columnWidthsRestored = true;
}
}
if (this.scrollable && this.scrollDirection !== 'vertical') {
Expand Down

0 comments on commit 1034859

Please sign in to comment.