Skip to content

Commit 2d10c7e

Browse files
authored
Merge pull request #8568 from marmelab/fix-docs
[Doc] Fix code examples
2 parents 3efe54b + ca2d2b7 commit 2d10c7e

4 files changed

+18
-19
lines changed

docs/ReferenceManyCount.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Use `<ReferenceManyCount>` as a regular Field in a `<Datagrid>` or `<SimpleShowL
1818

1919
```jsx
2020
import {
21-
ChipField
21+
ChipField,
2222
Datagrid,
2323
DateField,
2424
List,
@@ -163,4 +163,4 @@ The `<ReferenceManyCount>` component displays a loading indicator after 1 second
163163
target="post_id"
164164
timeout={500}
165165
/>
166-
```
166+
```

docs/ReferenceManyInput.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ By default, related records appear ordered by id desc. You can change this order
214214

215215
```jsx
216216
<ReferenceManyInput
217-
reference="variants"
218-
target="product_id"
219-
sort={{ field: 'sku', order: 'ASC' }}
217+
reference="variants"
218+
target="product_id"
219+
sort={{ field: 'sku', order: 'ASC' }}
220220
>
221221
...
222-
</ReferenceManyField>
222+
</ReferenceManyInput>
223223
```
224224

225225
{% endraw %}
@@ -242,12 +242,12 @@ You can override the style of the root component (a MUI [`<FormControl>`](https:
242242

243243
```jsx
244244
<ReferenceManyInput
245-
reference="variants"
246-
target="product_id"
247-
sx={{ marginLeft: 2 }}
245+
reference="variants"
246+
target="product_id"
247+
sx={{ marginLeft: 2 }}
248248
>
249249
...
250-
</ReferenceManyField>
250+
</ReferenceManyInput>
251251
```
252252

253253
{% endraw %}

docs/useGetLock.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@ const CustomToolbar = () => {
5656
5757
## Parameters
5858
59-
60-
- `resource`: the resource name (e.g. `'posts'`)
61-
- `params`: an object with the following properties:
62-
- `id`: the record id (e.g. `123`)
63-
- `meta`: Optional. an object that will be forwarded to the dataProvider (optional)
59+
- `resource`: the resource name (e.g. `'posts'`)
60+
- `params`: an object with the following properties:
61+
- `id`: the record id (e.g. `123`)
62+
- `meta`: Optional. an object that will be forwarded to the dataProvider
6463
6564
## Live Version
6665
67-
To get the list of locks update in real time based on the `lock/[resource]` topic, use [the `useGetLockLive` hook](./useGetLockLive.md) instead.
66+
To get the list of locks update in real time based on the `lock/[resource]` topic, use [the `useGetLockLive` hook](./useGetLockLive.md) instead.

docs/useInfiniteGetList.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The second parameter is the query passed to `dataProvider.getList()`. It is an o
108108
pagination: { page, perPage },
109109
sort: { field, order },
110110
filter: { ... },
111-
meta: { ...}
111+
meta: { ... }
112112
}
113113
```
114114
@@ -158,7 +158,7 @@ const { data } = useInfiniteGetList(
158158
pagination: { page: 1, perPage: 25 },
159159
sort: { field: 'published_at', order: 'DESC' },
160160
filter: { user_id: user && user.id },
161-
}
161+
},
162162
{ enabled: !!user }
163163
);
164164
```
@@ -232,4 +232,4 @@ const LatestNews = () => {
232232
</>
233233
);
234234
};
235-
```
235+
```

0 commit comments

Comments
 (0)