Hello,
we are using the checkbox in version 16.1.28.
The problem happens in our most extensive mask. It happens sometimes when we change in our ngbootstrap tabset the current tab. The Tab contains a *ngFor with the syncfusion checkbox. I think the exception happens because it tries to remove the old element.
This is the error message:
this.element.ej2_instances is undefined
Base.prototype.destroy@http://localhost:54963/dist/app.bundle.js:41538:1
Component.prototype.destroy@http://localhost:54963/dist/app.bundle.js:45321:9
CheckBox.prototype.destroy@http://localhost:54963/dist/app.bundle.js:66922:9
__WEBPACK_AMD_DEFINE_RESULT__
Functions from app.bundle.js
CheckBox.prototype.destroy = function () {
var _this = this;
var wrapper = this.getWrapper();
_super.prototype.destroy.call(this); // Error Line 66922
if (!this.disabled) {
this.unWireEvents();
}
if (this.tagName === 'INPUT') {
wrapper.parentNode.insertBefore(this.element, wrapper);
Object(__WEBPACK_IMPORTED_MODULE_0__syncfusion_ej2_base__["detach"])(wrapper);
this.element.checked = false;
if (this.indeterminate) {
this.element.indeterminate = false;
}
['name', 'value', 'disabled'].forEach(function (key) {
_this.element.removeAttribute(key);
});
}
else {
['role', 'aria-checked', 'class'].forEach(function (key) {
wrapper.removeAttribute(key);
});
if (this.element.id) {
wrapper.setAttribute('id', this.element.id);
}
wrapper.innerHTML = '';
}
};
Component.prototype.destroy = function () {
if (this.isDestroyed) {
return;
}
if (this.enablePersistence) {
this.setPersistData();
}
this.localObserver.destroy();
if (this.refreshing) {
return;
}
this.trigger('destroyed', { cancel: false });
_super.prototype.destroy.call(this); // Error Line 45321
this.moduleLoader.clean();
onIntlChange.off('notifyExternalChange', this.detectFunction);
};
Base.prototype.destroy = function () {
var _this = this;
this.element.ej2_instances =
this.element.ej2_instances.filter(function (i) { return i !== _this; }); // Error Line 41538
removeClass([this.element], ['e-' + this.getModuleName()]);
if (this.element.ej2_instances.length === 0) {
// Remove module class from the root element
removeClass([this.element], ['e-control']);
}
this.clearChanges();
this.modelObserver.destroy();
this.isDestroyed = true;
};