Skip to content

Commit e483a65

Browse files
committed
[Doc] Fix ReferenceField syntax
1 parent aa94fa8 commit e483a65

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

docs/ReferenceField.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ With this configuration, `<ReferenceField>` wraps the user's name in a link to t
7777
| `reference` | Required | `string` | - | The name of the resource for the referenced records, e.g. 'posts' |
7878
| `children` | Optional | `ReactNode` | - | One or more Field elements used to render the referenced record |
7979
| `emptyText` | Optional | `string` | '' | Defines a text to be shown when the field has no value or when the reference is missing |
80-
| `label` | Optional | `string | Function` | `resources.[resource].fields.[source]` | Label to use for the field when rendered in layout components |
80+
| `label` | Optional | `string | Function` | `resources. [resource]. fields.[source]` | Label to use for the field when rendered in layout components |
8181
| `link` | Optional | `string | Function` | `edit` | Target of the link wrapping the rendered child. Set to `false` to disable the link. |
82-
| `queryOptions` | Optional | [`UseQueryOptions`](https://tanstack.com/query/v4/docs/reference/useQuery?from=reactQueryV3&original=https://react-query-v3.tanstack.com/reference/useQuery) | `{}` | `react-query` client options |
82+
| `queryOptions` | Optional | [`UseQuery Options`](https://tanstack.com/query/v4/docs/reference/useQuery?from=reactQueryV3&original=https://react-query-v3.tanstack.com/reference/useQuery) | `{}` | `react-query` client options |
8383
| `sortBy` | Optional | `string | Function` | `source` | Name of the field to use for sorting when used in a Datagrid |
8484

8585
`<ReferenceField>` also accepts the [common field props](./Fields.md#common-field-props).
@@ -146,10 +146,11 @@ You can also use a custom `link` function to get a custom path for the children.
146146

147147
## `queryOptions`
148148

149-
Use the `queryOptions` prop to pass options to the `dataProvider.getMany()` query that fetches the referenced record.
149+
Use the `queryOptions` prop to pass options to [the `dataProvider.getMany()` query](http://0.0.0.0:4000/useGetOne.html#aggregating-getone-calls) that fetches the referenced record.
150150

151151
For instance, to pass [a custom `meta`](./Actions.md#meta-parameter):
152152

153+
{% raw %}
153154
```jsx
154155
<ReferenceField
155156
source="user_id"
@@ -159,6 +160,7 @@ For instance, to pass [a custom `meta`](./Actions.md#meta-parameter):
159160
<TextField source="name" />
160161
</ReferenceField>
161162
```
163+
{% endraw %}
162164

163165
## `reference`
164166

0 commit comments

Comments
 (0)