Skip to content

Commit aed19c8

Browse files
committed
Apply review suggestions
1 parent 076f175 commit aed19c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/ReferenceManyField.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ React-admin uses [the i18n system](./Translation.md) to translate the label, so
310310

311311
## `offline`
312312

313-
Use `offline` to customize the text displayed when there are no related records because of lack of network connectivity.
313+
By default, `<ReferenceManyField>` renders the `<Offline variant="inline">` when there is no connectivity and the records haven't been cached yet. You can provide your own component via the `offline` prop:
314314

315315
```jsx
316316
<ReferenceManyField

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const ReferenceManyFieldBase = <
119119

120120
const shouldRenderLoading =
121121
isPending && !isPaused && loading !== false && loading !== undefined;
122-
const showOffline =
122+
const shouldRenderOffline =
123123
isPaused &&
124124
(isPending || isPlaceholderData) &&
125125
offline !== false &&
@@ -150,7 +150,7 @@ export const ReferenceManyFieldBase = <
150150
<ListContextProvider value={controllerProps}>
151151
{shouldRenderLoading
152152
? loading
153-
: showOffline
153+
: shouldRenderOffline
154154
? offline
155155
: shouldRenderError
156156
? error

0 commit comments

Comments
 (0)