You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Choose the first value "Fusce massa lorem, pulvinar a posuere ut, accumsan ac nisi"
Click on any other element
See an error: "Associated reference no longer appears to be available"
Related code:
import * as React from "react";
import {
Create,
SimpleForm,
ReferenceInput,
AutocompleteInput
} from "react-admin";
const CommentCreate = (props) => {
return (
<Create {...props}>
<SimpleForm redirect={false}>
<ReferenceInput reference="posts" source="post_id">
<AutocompleteInput
resettable
optionText="title"
// can't change value many times whith optionValue when user use keyboard
// has an error when the value set once again
optionValue="originId"
/>
</ReferenceInput>
</SimpleForm>
</Create>
);
};
export default CommentCreate;
Yes, although we support custom optionValue in all the selection inputs such as AutocompleteInput, it doesn't work within references which requires id. See #2022 (comment)
What you were expecting:
Use ReferenceInput includes Autocompletenput. Documentation
What happened instead:
Has error when change value once or once again
Steps to reproduce:
Related code:
codesandbox
Environment
The text was updated successfully, but these errors were encountered: