Skip to content

Commit baabe56

Browse files
committed
[Doc] Update ReferenceManyInput documentation to mention it cannot reorder its items
1 parent fd26e65 commit baabe56

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/ReferenceManyInput.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const ProductEdit = () => (
5656
<NumberInput source="price" />
5757
<ReferenceInput source="category_id" reference="categories" />
5858
<ReferenceManyInput reference="variants" target="product_id">
59-
<SimpleFormIterator inline>
59+
<SimpleFormIterator inline disableReordering>
6060
<TextInput source="sku" />
6161
<SelectInput source="size" choices={sizes} />
6262
<SelectInput source="color" choices={colors} />
@@ -97,7 +97,7 @@ const ProductEdit = () => (
9797

9898
```jsx
9999
<ReferenceManyInput reference="variants" target="product_id">
100-
<SimpleFormIterator>
100+
<SimpleFormIterator disableReordering>
101101
<TextInput source="sku" />
102102
<SelectInput source="size" choices={sizes} />
103103
<SelectInput source="color" choices={colors} />
@@ -125,7 +125,7 @@ You can use the `defaultValue` prop to populate the list of related records in t
125125
{ sku: 'SKU_4', size: 'XL', color: 'black', stock: 0 },
126126
]}
127127
>
128-
<SimpleFormIterator>
128+
<SimpleFormIterator disableReordering>
129129
<TextInput source="sku" />
130130
<SelectInput source="size" choices={sizes} />
131131
<SelectInput source="color" choices={colors} />
@@ -297,6 +297,7 @@ const ProductEdit = () => (
297297
## Limitations
298298

299299
- `<ReferenceManyInput>` cannot be used inside an `<ArrayInput>` or a `<ReferenceOneInput>`.
300+
- `<ReferenceManyInput>` does not support reordering its items so you should set `disableReordering` on `<SimpleFormIterator>` if you use it.
300301
- `<ReferenceManyInput>` cannot be used with `undoable` mutations in a `<Create>` view.
301302
- `<ReferenceManyInput>` cannot have a `<ReferenceOneInput>` or a `<ReferenceManyToManyInput>` as one of its children.
302303
- `<ReferenceManyInput>` does not support server side validation.

0 commit comments

Comments
 (0)