Skip to content

Commit 0141369

Browse files
committed
Fix Loading component timeout
1 parent a99880b commit 0141369

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ export const Loading = (inProps: LoadingProps) => {
1818
className,
1919
loadingPrimary = 'ra.page.loading',
2020
loadingSecondary = 'ra.message.loading',
21+
timeout = 1000,
2122
...rest
2223
} = props;
23-
const oneSecondHasPassed = useTimeout(1000);
24+
const oneSecondHasPassed = useTimeout(timeout);
2425
const translate = useTranslate();
2526
return oneSecondHasPassed ? (
2627
<Root className={className} {...rest}>
@@ -41,6 +42,7 @@ export interface LoadingProps {
4142
className?: string;
4243
loadingPrimary?: string;
4344
loadingSecondary?: string;
45+
timeout?: number;
4446
sx?: SxProps<Theme>;
4547
}
4648

0 commit comments

Comments
 (0)