Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/core/ui/core/view-base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ export abstract class ViewBase extends Observable {
*/
public destroyNode(forceDestroyChildren?: boolean): void {
this.reusable = false;
this.callUnloaded();
this.unloadView(this);
this._tearDownUI(forceDestroyChildren);
}

Expand All @@ -1284,7 +1284,9 @@ export abstract class ViewBase extends Observable {

if (!preserveNativeView) {
this.eachChild((child) => {
child._tearDownUI(force);
// if we decided to tear down the current view, we should also tear down the children, even if they are reusable
// the developer is responsible to detach them if they need to reuse them somewhere else
child._tearDownUI(true);

return true;
});
Expand Down
Loading