clear settings temp storage
This commit is contained in:
@@ -63,13 +63,13 @@ class ListSettingsHelper {
|
|||||||
* @internal
|
* @internal
|
||||||
*
|
*
|
||||||
* @param {string} entityType
|
* @param {string} entityType
|
||||||
* @param {string} type
|
* @param {string} key A key used for storage.
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @param {{useStorage?: boolean}} options
|
* @param {{useStorage?: boolean}} options
|
||||||
*/
|
*/
|
||||||
constructor(entityType, type, userId, options = {}) {
|
constructor(entityType, key, userId, options = {}) {
|
||||||
/** @private */
|
/** @private */
|
||||||
this.layoutColumnsKey = `${type}-${entityType}-${userId}`;
|
this.layoutColumnsKey = `${key}-${entityType}-${userId}`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -140,6 +140,26 @@ class ListSettingsHelper {
|
|||||||
return this.sessionStorage.clear(this.getSessionKey(key));
|
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
|
* @private
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
|
|||||||
@@ -2294,6 +2294,10 @@ class ListRecordView extends View {
|
|||||||
|
|
||||||
onRemove() {
|
onRemove() {
|
||||||
this.destroyStickyBar();
|
this.destroyStickyBar();
|
||||||
|
|
||||||
|
if (this._listSettingsHelper) {
|
||||||
|
this._listSettingsHelper.clearTemporaryStorage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
afterRender() {
|
afterRender() {
|
||||||
|
|||||||
Reference in New Issue
Block a user