Merge pull request #2526 from umbraco/v15/feature/make-extension-slot-destroy-on-disconnect
Remove attached on destroy
This commit is contained in:
@@ -129,6 +129,7 @@ export const UmbControllerHostMixin = <T extends ClassConstructor>(superClass: T
|
||||
prev = ctrl;
|
||||
}
|
||||
this.#controllers.length = 0;
|
||||
this.#attached = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -310,6 +310,7 @@ export abstract class UmbBaseExtensionInitializer<
|
||||
/*
|
||||
public hostConnected(): void {
|
||||
super.hostConnected();
|
||||
// Should not be nesecary as conditions would be reactive to connectedCallback, as they will use consumeContext. [NL]
|
||||
//this.#onConditionsChangedCallback();
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -103,6 +103,7 @@ export class UmbExtensionSlotElement extends UmbLitElement {
|
||||
this.#observeExtensions();
|
||||
}
|
||||
override disconnectedCallback(): void {
|
||||
// _permitted is reset as the extensionsController fires a callback on destroy.
|
||||
this.#attached = false;
|
||||
this.#extensionsController?.destroy();
|
||||
this.#extensionsController = undefined;
|
||||
|
||||
Reference in New Issue
Block a user