move method

This commit is contained in:
Niels Lyngsø
2023-01-09 15:52:17 +01:00
parent 913cce2133
commit 16e5945ac8

View File

@@ -149,9 +149,14 @@ export class UmbWorkspacePropertyElement extends UmbLitElement {
// TODO: maybe this would be called change.
this.addEventListener('change', this._onPropertyEditorChange as any as EventListener);
}
private _onPropertyEditorChange = (e: CustomEvent) => {
const target = e.composedPath()[0] as any;
this.value = target.value;// Sets value in context.
};
private _observePropertyEditorUI() {
this.propertyEditorUIObserver?.destroy();
this.propertyEditorUIObserver = this.observe(umbExtensionsRegistry.getByTypeAndAlias('propertyEditorUI', this.propertyEditorUIAlias), (manifest) => {
@@ -188,16 +193,7 @@ export class UmbWorkspacePropertyElement extends UmbLitElement {
// TODO: loading JS failed so we should do some nice UI. (This does only happen if extension has a js prop, otherwise we concluded that no source was needed resolved the load.)
});
}
private _onPropertyEditorChange = (e: CustomEvent) => {
const target = e.composedPath()[0] as any;
this.value = target.value;// Sets value in context.
console.log("property Context got `change` event from element with value of ", this.value);
};
render() {
return html`