Skip to content

Commit 8fdffa3

Browse files
Madeorskslax57
andcommitted
Apply review suggestions.
Co-authored-by: Jean-Baptiste Kaiser <[email protected]>
1 parent 8475336 commit 8fdffa3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs_headless/src/content/docs/RecordsIterator.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const PostShow = () => (
5252
);
5353
```
5454

55-
`<RecordsIterator>` expects that data is properly loaded, without error. If you want to handle loading, error, offline and empty states, use properties on the component providing you the list context (like [`<List loading>`](./List.md), [`<ReferenceArrayField loading>`](./ReferenceArrayField.md), [`<ReferenceManyField loading>`](./ReferenceManyField.md)). You can also make use of [`<WithListContext>`](./WithListContext.md) [`loading`](./WithListContext.md#loading), [`error`](./WithListContext.md#error), [`offline`](./WithListContext.md#offline) and [`empty`](./WithListContext.md#empty) props.
55+
`<RecordsIterator>` expects that data is properly loaded, without error. If you want to handle loading, error, offline and empty states, use properties on the component providing you the list context (like [`<ListBase loading>`](./ListBase.md), [`<ReferenceArrayFieldBase loading>`](./ReferenceArrayFieldBase.md), [`<ReferenceManyFieldBase loading>`](./ReferenceManyFieldBase.md)). You can also make use of [`<WithListContext>`](./WithListContext.md) [`loading`](./WithListContext.md#loading), [`error`](./WithListContext.md#error), [`offline`](./WithListContext.md#offline) and [`empty`](./WithListContext.md#empty) props.
5656

5757
```jsx
5858
import { ListBase, RecordsIterator } from 'ra-core';
@@ -77,14 +77,12 @@ const MostVisitedPosts = () => (
7777

7878
## Props
7979

80-
`<RecordsIterator>` exposes the following important props:
81-
8280
| Prop | Required | Type | Default | Description |
8381
| ----------- |-------------|-----------------------------------| ------- | ---------------------------------------------------------------------------------------------------- |
8482
| `children` | Optional`*` | `ReactNode` | - | The content to render for each record |
85-
| `data` | Optional`*` | `RaRecord[]` | - | The records. Defaults to the `data` from the [`ListContext`](./useListContext.md) |
83+
| `data` | Optional | `RaRecord[]` | - | The records. Defaults to the `data` from the [`ListContext`](./useListContext.md) |
8684
| `isPending` | Optional | `boolean` | - | A boolean indicating whether the data is pending. Defaults to the `isPending` from the [`ListContext`](./useListContext.md) |
87-
| `render` | Optional | `(record: RaRecord) => ReactNode` | - | A function that returns the content to render for each record |
85+
| `render` | Optional`*` | `(record: RaRecord) => ReactNode` | - | A function that returns the content to render for each record |
8886
| `total` | Optional | `number` | - | The total number of records. Defaults to the `total` from the [`ListContext`](./useListContext.md) |
8987

9088
`*` Either `children` or `render` is required.

0 commit comments

Comments
 (0)