Fixed #1178 - DataTable state restoring seems broken for columnOrder and columnWidths

pull/1196/head^2
mertsincan 2021-05-17 02:31:38 +03:00
parent 2b9a2de321
commit 10348594f3
1 changed files with 4 additions and 5 deletions

View File

@ -392,6 +392,10 @@ export default {
if (this.responsiveLayout === 'stack' && !this.scrollable) { if (this.responsiveLayout === 'stack' && !this.scrollable) {
this.createResponsiveStyle(); this.createResponsiveStyle();
} }
if (this.isStateful() && this.resizableColumns) {
this.restoreColumnWidths();
}
}, },
beforeUnmount() { beforeUnmount() {
this.unbindColumnResizeEvents(); this.unbindColumnResizeEvents();
@ -400,11 +404,6 @@ export default {
updated() { updated() {
if (this.isStateful()) { if (this.isStateful()) {
this.saveState(); this.saveState();
if (this.resizableColumns && !this.columnWidthsRestored) {
this.restoreColumnWidths();
this.columnWidthsRestored = true;
}
} }
if (this.scrollable && this.scrollDirection !== 'vertical') { if (this.scrollable && this.scrollDirection !== 'vertical') {