clear settings temp storage

This commit is contained in:
Yurii
2026-02-05 15:40:28 +02:00
parent a694db623c
commit ecad172891
2 changed files with 27 additions and 3 deletions
+23 -3
View File
@@ -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
+4
View File
@@ -2294,6 +2294,10 @@ class ListRecordView extends View {
onRemove() {
this.destroyStickyBar();
if (this._listSettingsHelper) {
this._listSettingsHelper.clearTemporaryStorage();
}
}
afterRender() {