From ecad17289173feb6269903976fa6fd27ff5efdcd Mon Sep 17 00:00:00 2001 From: Yurii Date: Thu, 5 Feb 2026 15:40:28 +0200 Subject: [PATCH] clear settings temp storage --- client/src/helpers/list/settings.js | 26 +++++++++++++++++++++++--- client/src/views/record/list.js | 4 ++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/client/src/helpers/list/settings.js b/client/src/helpers/list/settings.js index d845b27f35..38dfb1def4 100644 --- a/client/src/helpers/list/settings.js +++ b/client/src/helpers/list/settings.js @@ -63,13 +63,13 @@ class ListSettingsHelper { * @internal * * @param {string} entityType - * @param {string} type + * @param {string} key A key used for storage. * @param {string} userId * @param {{useStorage?: boolean}} options */ - constructor(entityType, type, userId, options = {}) { + constructor(entityType, key, userId, options = {}) { /** @private */ - this.layoutColumnsKey = `${type}-${entityType}-${userId}`; + this.layoutColumnsKey = `${key}-${entityType}-${userId}`; /** * @private @@ -140,6 +140,26 @@ class ListSettingsHelper { return this.sessionStorage.clear(this.getSessionKey(key)); } + + /** + * @internal + */ + clearTemporaryStorage() { + if (this.useStorage) { + return; + } + + const keys = [ + 'listHiddenColumns', + 'listColumnResize', + 'listColumnsWidths', + ]; + + for (const key of keys) { + this.clearStored(this.getSessionKey(key)); + } + } + /** * @private * @param {string} key diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js index eef2f504e3..badf23ea83 100644 --- a/client/src/views/record/list.js +++ b/client/src/views/record/list.js @@ -2294,6 +2294,10 @@ class ListRecordView extends View { onRemove() { this.destroyStickyBar(); + + if (this._listSettingsHelper) { + this._listSettingsHelper.clearTemporaryStorage(); + } } afterRender() {