move logic to firstUpdated and add await so that we dont re-render when tinymce gets loaded

This commit is contained in:
Jacob Overgaard
2023-06-22 14:12:32 +02:00
parent 3f4912a274
commit 6a692a6cec

View File

@@ -62,10 +62,10 @@ export class UmbInputTinyMceElement extends FormControlMixin(UmbLitElement) {
this.observe(this.#auth.currentUser, (currentUser) => (this.#currentUser = currentUser));
}
async connectedCallback() {
super.connectedCallback();
protected async firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): Promise<void> {
super.firstUpdated(_changedProperties);
await this.#loadPlugins();
this.#setTinyConfig();
await this.#setTinyConfig();
}
disconnectedCallback() {