mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(loading): use loading overlay inline (#26153)
This commit is contained in:
@@ -53,6 +53,8 @@ export const CoreDelegate = () => {
|
||||
userComponentProps: any = {},
|
||||
cssClasses: string[] = []
|
||||
) => {
|
||||
const hasUserDefinedComponent = userComponent !== undefined;
|
||||
|
||||
BaseComponent = parentElement;
|
||||
/**
|
||||
* If passing in a component via the `component` props
|
||||
@@ -86,7 +88,7 @@ export const CoreDelegate = () => {
|
||||
BaseComponent.appendChild(el);
|
||||
|
||||
await new Promise((resolve) => componentOnReady(el, resolve));
|
||||
} else if (BaseComponent.children.length > 0) {
|
||||
} else if (hasUserDefinedComponent && BaseComponent.children.length > 0) {
|
||||
// If there is no component, then we need to create a new parent
|
||||
// element to apply the css classes to.
|
||||
const el = BaseComponent.ownerDocument?.createElement('div');
|
||||
|
||||
Reference in New Issue
Block a user