@syncfusion/ej2-base 22.2.5 → 22.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/bin/syncfusion-license.js +1 -1
- package/dist/ej2-base.min.js +2 -2
- package/dist/ej2-base.umd.min.js +2 -2
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +21 -1
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +21 -1
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +2 -2
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +6 -66
- package/src/component.d.ts +12 -0
- package/src/component.js +21 -1
- package/styles/_material-definition.scss +1 -1
- package/styles/material.css +1 -1
- package/styles/offline-theme/material.css +1 -1
|
@@ -7230,6 +7230,7 @@ let Component = class Component extends Base {
|
|
|
7230
7230
|
}
|
|
7231
7231
|
if (this.enablePersistence) {
|
|
7232
7232
|
this.setPersistData();
|
|
7233
|
+
this.detachUnloadEvent();
|
|
7233
7234
|
}
|
|
7234
7235
|
this.localObserver.destroy();
|
|
7235
7236
|
if (this.refreshing) {
|
|
@@ -7291,6 +7292,25 @@ let Component = class Component extends Base {
|
|
|
7291
7292
|
return window.localStorage.getItem(eleId);
|
|
7292
7293
|
}
|
|
7293
7294
|
}
|
|
7295
|
+
/**
|
|
7296
|
+
* Adding unload event to persist data when enable persistence true
|
|
7297
|
+
*/
|
|
7298
|
+
attachUnloadEvent() {
|
|
7299
|
+
this.handleUnload = this.handleUnload.bind(this);
|
|
7300
|
+
window.addEventListener('unload', this.handleUnload);
|
|
7301
|
+
}
|
|
7302
|
+
/**
|
|
7303
|
+
* Handling unload event to persist data when enable persistence true
|
|
7304
|
+
*/
|
|
7305
|
+
handleUnload() {
|
|
7306
|
+
this.setPersistData();
|
|
7307
|
+
}
|
|
7308
|
+
/**
|
|
7309
|
+
* Removing unload event to persist data when enable persistence true
|
|
7310
|
+
*/
|
|
7311
|
+
detachUnloadEvent() {
|
|
7312
|
+
window.removeEventListener('unload', this.handleUnload);
|
|
7313
|
+
}
|
|
7294
7314
|
/**
|
|
7295
7315
|
* Appends the control within the given HTML element
|
|
7296
7316
|
*
|
|
@@ -7313,7 +7333,7 @@ let Component = class Component extends Base {
|
|
|
7313
7333
|
}
|
|
7314
7334
|
if (this.enablePersistence) {
|
|
7315
7335
|
this.mergePersistData();
|
|
7316
|
-
|
|
7336
|
+
this.attachUnloadEvent();
|
|
7317
7337
|
}
|
|
7318
7338
|
const inst = getValue('ej2_instances', this.element);
|
|
7319
7339
|
if (!inst || inst.indexOf(this) === -1) {
|