Skip to content

Commit

Permalink
[Doc] Update ReferenceManyInput documentation to mention it cannot re…
Browse files Browse the repository at this point in the history
…order its items
  • Loading branch information
djhi committed Feb 26, 2025
1 parent fd26e65 commit baabe56
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit baabe56

Please sign in to comment.