rename layout to modal element
This commit is contained in:
@@ -72,16 +72,16 @@ export class UmbModalHandler {
|
|||||||
return modalDialogElement;
|
return modalDialogElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
async #createLayoutElement(manifest: ManifestModal, data?: unknown) {
|
async #createModalElement(manifest: ManifestModal, data?: unknown) {
|
||||||
// TODO: add fallback element if no layout is found
|
// TODO: add fallback element if no modal element is found
|
||||||
const layoutElement = (await createExtensionElement(manifest)) as any;
|
const modalElement = (await createExtensionElement(manifest)) as any;
|
||||||
|
|
||||||
if (layoutElement) {
|
if (modalElement) {
|
||||||
layoutElement.data = data;
|
modalElement.data = data;
|
||||||
layoutElement.modalHandler = this;
|
modalElement.modalHandler = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
return layoutElement;
|
return modalElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
public close(...args: any) {
|
public close(...args: any) {
|
||||||
@@ -103,7 +103,7 @@ export class UmbModalHandler {
|
|||||||
umbExtensionsRegistry.getByTypeAndAlias('modal', modalAlias),
|
umbExtensionsRegistry.getByTypeAndAlias('modal', modalAlias),
|
||||||
async (manifest) => {
|
async (manifest) => {
|
||||||
if (manifest) {
|
if (manifest) {
|
||||||
const element = await this.#createLayoutElement(manifest, data);
|
const element = await this.#createModalElement(manifest, data);
|
||||||
this.#appendModalElement(element);
|
this.#appendModalElement(element);
|
||||||
this.#element.next(element);
|
this.#element.next(element);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user