From 56e9c4b48749c4258c80d5d2f8e82f0352ee07ec Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Tue, 21 Nov 2023 16:37:27 +0300 Subject: [PATCH] Fixed #4855 - DataTable: restore state defect --- components/lib/datatable/DataTable.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/components/lib/datatable/DataTable.vue b/components/lib/datatable/DataTable.vue index 296186d28..96d4f4ef0 100755 --- a/components/lib/datatable/DataTable.vue +++ b/components/lib/datatable/DataTable.vue @@ -416,11 +416,6 @@ export default { } } }, - beforeMount() { - if (this.isStateful()) { - this.restoreState(); - } - }, mounted() { this.$el.setAttribute(this.attributeSelector, ''); @@ -428,8 +423,10 @@ export default { this.createResponsiveStyle(); } - if (this.isStateful() && this.resizableColumns) { - this.restoreColumnWidths(); + if (this.isStateful()) { + this.restoreState(); + + this.resizableColumns && this.restoreColumnWidths(); } if (this.editMode === 'row' && this.dataKey && !this.d_editingRowKeys) {