Skip to content

Commit 9c75e3e

Browse files
committed
Use IsPlaceholderData in ReferenceArrayFieldBase
1 parent 7a6c9c0 commit 9c75e3e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/ra-core/src/controller/field/ReferenceArrayFieldBase.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,20 @@ export const ReferenceArrayFieldBase = <
108108
"<ReferenceArrayFieldBase> requires either a 'render' prop or 'children' prop"
109109
);
110110
}
111-
const { error: controllerError, isPending, isPaused } = controllerProps;
111+
const {
112+
error: controllerError,
113+
isPending,
114+
isPaused,
115+
isPlaceholderData,
116+
} = controllerProps;
112117

113118
const shouldRenderLoading =
114119
isPending && !isPaused && loading !== undefined && loading !== false;
115120
const shouldRenderOffline =
116-
isPending && isPaused && offline !== undefined && offline !== false;
121+
isPaused &&
122+
(isPending || isPlaceholderData) &&
123+
offline !== undefined &&
124+
offline !== false;
117125
const shouldRenderError =
118126
!isPending &&
119127
!isPaused &&

0 commit comments

Comments
 (0)