Skip to content

Commit ef8b2b7

Browse files
committed
Fix Loading component timeout
1 parent d260152 commit ef8b2b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/ra-ui-materialui/src/layout/Loading.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ export const Loading = (props: LoadingProps) => {
99
className,
1010
loadingPrimary = 'ra.page.loading',
1111
loadingSecondary = 'ra.message.loading',
12+
timeout = 1000,
1213
...rest
1314
} = props;
14-
const oneSecondHasPassed = useTimeout(1000);
15+
const oneSecondHasPassed = useTimeout(timeout);
1516
const translate = useTranslate();
1617
return oneSecondHasPassed ? (
1718
<Root className={className} {...rest}>
@@ -32,6 +33,7 @@ export interface LoadingProps {
3233
className?: string;
3334
loadingPrimary?: string;
3435
loadingSecondary?: string;
36+
timeout?: number;
3537
sx?: SxProps;
3638
}
3739

0 commit comments

Comments
 (0)