Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Update <ReferenceManyInput> documentation to mention it cannot reorder its items #10551

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/ReferenceManyInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const ProductEdit = () => (
<NumberInput source="price" />
<ReferenceInput source="category_id" reference="categories" />
<ReferenceManyInput reference="variants" target="product_id">
<SimpleFormIterator inline>
<SimpleFormIterator inline disableReordering>
<TextInput source="sku" />
<SelectInput source="size" choices={sizes} />
<SelectInput source="color" choices={colors} />
Expand Down Expand Up @@ -97,7 +97,7 @@ const ProductEdit = () => (

```jsx
<ReferenceManyInput reference="variants" target="product_id">
<SimpleFormIterator>
<SimpleFormIterator disableReordering>
<TextInput source="sku" />
<SelectInput source="size" choices={sizes} />
<SelectInput source="color" choices={colors} />
Expand Down Expand Up @@ -125,7 +125,7 @@ You can use the `defaultValue` prop to populate the list of related records in t
{ sku: 'SKU_4', size: 'XL', color: 'black', stock: 0 },
]}
>
<SimpleFormIterator>
<SimpleFormIterator disableReordering>
<TextInput source="sku" />
<SelectInput source="size" choices={sizes} />
<SelectInput source="color" choices={colors} />
Expand Down Expand Up @@ -297,6 +297,7 @@ const ProductEdit = () => (
## Limitations

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