Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class UmbExtensionWithApiSlotElement extends UmbLitElement {
if (value === this.#type) return;
this.#type = value;
if (this.#attached) {
this._observeExtensions();
this.#observeExtensions();
}
}
#type?: string | string[] | undefined;
Expand All @@ -68,7 +68,7 @@ export class UmbExtensionWithApiSlotElement extends UmbLitElement {
if (value === this.#filter) return;
this.#filter = value;
if (this.#attached) {
this._observeExtensions();
this.#observeExtensions();
}
}
#filter: (manifest: any) => boolean = () => true;
Expand Down Expand Up @@ -107,8 +107,9 @@ export class UmbExtensionWithApiSlotElement extends UmbLitElement {
return this.#constructorArgs;
}
set apiArgs(newVal: Array<unknown> | UmbApiConstructorArgumentsMethodType<any> | undefined) {
// TODO, compare changes since last time. only reset the ones that changed. This might be better done by the controller is self:
if (newVal === this.#constructorArgs) return;
this.#constructorArgs = newVal;
this.#observeExtensions();
}
#constructorArgs?: Array<unknown> | UmbApiConstructorArgumentsMethodType<any> = [];

Expand Down Expand Up @@ -146,11 +147,11 @@ export class UmbExtensionWithApiSlotElement extends UmbLitElement {

connectedCallback(): void {
super.connectedCallback();
this._observeExtensions();
this.#observeExtensions();
this.#attached = true;
}

private _observeExtensions(): void {
#observeExtensions(): void {
this.#extensionsController?.destroy();
if (this.#type) {
this.#extensionsController = new UmbExtensionsElementAndApiInitializer(
Expand Down