mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-04 10:11:26 +01:00
More widget cleanup
This commit is contained in:
parent
3793108c58
commit
0e15989eda
@ -104,7 +104,7 @@ export class Et2SelectCategory extends Et2StaticSelectMixin(Et2TreeDropdown)
|
||||
const box = this.shadowRoot?.querySelector('.tree-dropdown__combobox');
|
||||
if(box)
|
||||
{
|
||||
this.egw().tooltipUnbind(box, this.egw().lang(this.statustext));
|
||||
this.egw().tooltipUnbind(box);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -804,12 +804,11 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
// Clear any deferred properties, functions may live in here
|
||||
this._deferred_properties = {};
|
||||
|
||||
// Not really needed, use the disconnectedCallback() and let the browser handle it
|
||||
|
||||
// Call the destructor of all children so any legacy widgets get destroyed
|
||||
for(let i = this.getChildren().length - 1; i >= 0; i--)
|
||||
{
|
||||
this.getChildren()[i].destroy();
|
||||
this.getChildren()[i] instanceof Et2WidgetClass && (<Et2WidgetClass>this.getChildren()[i]).remove();
|
||||
}
|
||||
|
||||
// Free the array managers if they belong to this widget
|
||||
|
@ -301,12 +301,14 @@ export class et2_widget extends ClassWithAttributes
|
||||
{
|
||||
this._children[i].destroy();
|
||||
}
|
||||
this._children.splice(0, this._children.length);
|
||||
|
||||
// Remove this element from the parent, if it exists
|
||||
if(typeof this._parent != "undefined" && this._parent !== null && this._parent instanceof et2_widget)
|
||||
{
|
||||
this._parent.removeChild(this);
|
||||
}
|
||||
this._parent = null;
|
||||
|
||||
// Free the array managers if they belong to this widget
|
||||
for (var key in this._mgrs)
|
||||
|
@ -249,6 +249,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
||||
this.widgets = {};
|
||||
this.detachedNodes = [];
|
||||
this.tbody = null;
|
||||
this.table = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,8 +61,11 @@ export class et2_nextmatch_rowProvider
|
||||
destroy()
|
||||
{
|
||||
this._rowProvider.destroy();
|
||||
this._rowProvider = null;
|
||||
this._subgridCallback = null;
|
||||
this._context = null;
|
||||
this._rootWidget = null;
|
||||
this._template = null;
|
||||
this._dataRow = null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user