Skip to content

Commit c7b22d6

Browse files
committed
Fix detail views handling of offline state
1 parent 6d3daeb commit c7b22d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/ra-ui-materialui/src/detail/EditView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const EditView = (inProps: EditViewProps) => {
4040
const { resource, defaultTitle, record, isPending, isPaused } =
4141
useEditContext();
4242

43-
if (isPaused && offline) {
43+
if (isPaused && record == null && offline) {
4444
return (
4545
<Root className={clsx('edit-page', className)} {...rest}>
4646
<div

packages/ra-ui-materialui/src/detail/ShowView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const ShowView = (inProps: ShowViewProps) => {
3737
const { resource, defaultTitle, isPaused, record } = useShowContext();
3838
const { hasEdit } = useResourceDefinition();
3939

40-
if (isPaused && offline) {
40+
if (isPaused && record == null && offline) {
4141
return (
4242
<Root className={clsx('show-page', className)} {...rest}>
4343
<div

0 commit comments

Comments
 (0)