mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00
fix(react): loading layout is correct with no message (#26222)
Resolves #26219
This commit is contained in:
@ -18,7 +18,7 @@ export function useIonLoading(): UseIonLoadingResult {
|
|||||||
|
|
||||||
const present = useCallback(
|
const present = useCallback(
|
||||||
(
|
(
|
||||||
messageOrOptions: string | (LoadingOptions & HookOverlayOptions) = '',
|
messageOrOptions: string | (LoadingOptions & HookOverlayOptions) = {},
|
||||||
duration?: number,
|
duration?: number,
|
||||||
spinner?: SpinnerTypes
|
spinner?: SpinnerTypes
|
||||||
) => {
|
) => {
|
||||||
@ -26,7 +26,7 @@ export function useIonLoading(): UseIonLoadingResult {
|
|||||||
return controller.present({
|
return controller.present({
|
||||||
message: messageOrOptions,
|
message: messageOrOptions,
|
||||||
duration,
|
duration,
|
||||||
spinner: spinner ?? 'lines',
|
spinner,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return controller.present(messageOrOptions);
|
return controller.present(messageOrOptions);
|
||||||
|
Reference in New Issue
Block a user