Skip to content

Commit 68637c0

Browse files
committed
fix render type in doc
1 parent 8b256f5 commit 68637c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/ReferenceArrayFieldBase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ You can change how the list of related records is rendered by passing a custom c
9696
| `source` | Required | `string` | - | Name of the property to display |
9797
| `reference` | Required | `string` | - | The name of the resource for the referenced records, e.g. 'tags' |
9898
| `children` | Required if no render | `Element` | | One or several elements that render a list of records based on a `ListContext` |
99-
| `render` | Required if no children | `Element` | | A function that takes a list context and render a list of records |
99+
| `render` | Required if no children | `(listContext) => Element` | | A function that takes a list context and render a list of records |
100100
| `filter` | Optional | `Object` | - | Filters to use when fetching the related records (the filtering is done client-side) |
101101
| `pagination` | Optional | `Element` | - | Pagination element to display pagination controls. empty by default (no pagination) |
102102
| `perPage` | Optional | `number` | 1000 | Maximum number of results to display |

docs/ReferenceOneFieldBase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const MyBookView = ({ source }) => {
7676
| `reference` | Required | `string` | - | The name of the resource for the referenced records, e.g. 'book_details' |
7777
| `target` | Required | string | - | Target field carrying the relationship on the referenced resource, e.g. 'book_id' |
7878
| `children` | Required if no render | `Element` | - | React component to render the referenced record, the component need to use useReferenceOneFieldContext to access the context. |
79-
| `render` | Required if no children | `Element` | - | A function that takes the reference field context and return a React element |
79+
| `render` | Required if no children | `(referenceFieldContext) => Element` | - | A function that takes the reference field context and return a React element |
8080
| `empty` | Optional | `ReactNode` | - | The text or element to display when the referenced record is empty |
8181
| `filter` | Optional | `Object` | `{}` | Used to filter referenced records |
8282
| `link` | Optional | `string | Function` | `edit` | Target of the link wrapping the rendered child. Set to `false` to disable the link. |

0 commit comments

Comments
 (0)