Skip to content

Commit 25410af

Browse files
authored
Merge pull request #2082 from umbraco/v14/bugfix/add-getter-to-remove-lit-warning
Bugfix: Add getter for pickerContext in UmbInputEntityElement
2 parents 1e85b22 + 879d34d commit 25410af

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/packages/core/components/input-entity/input-entity.element.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,14 @@ export class UmbInputEntityElement extends UmbFormControlMixin<string | undefine
8383
}
8484

8585
@property({ attribute: false })
86-
public set pickerContext(ctor: new (host: UmbControllerHost) => UmbPickerInputContext<any, any, any, any>) {
86+
public set pickerContext(ctor: (new (host: UmbControllerHost) => UmbPickerInputContext) | undefined) {
8787
if (this.#pickerContext) return;
88-
this.#pickerContext = new ctor(this);
88+
this.#pickerContext = ctor ? new ctor(this) : undefined;
8989
this.#observePickerContext();
9090
}
91+
public get pickerContext(): UmbPickerInputContext | undefined {
92+
return this.#pickerContext;
93+
}
9194

9295
@state()
9396
private _items?: Array<UmbUniqueItemModel>;

0 commit comments

Comments
 (0)