We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
What you were expecting:
According to Prefilling the Form document, create form should be filled with the values provided.
What happened instead:
Location's state is null and inputs are blank.
Steps to reproduce:
Use a customized create button with state or search.
<Button component={Link} to={{ pathname: "/posts/create", state: { record: { title: "foobar" } }, search: "?teaser=teaser" }} color="primary" size="small" >
Related code:
https://codesandbox.io/s/ancient-worker-jlmxgn?file=/src/posts/PostActions.js
Environment
The text was updated successfully, but these errors were encountered:
Hi, Thank you for submitting this. Actually this is a mistake in the documentation, here is how to achieve this:
<Button component={Link} to={{ pathname: "/posts/create", - state: { - record: { - title: "foobar" - } - }, search: "?teaser=teaser" }} + state={{ + record: { + title: "foobar" + } + }} color="primary" size="small" > Create Prefill </Button>
I'll mark this as a documentation issue.
Sorry, something went wrong.
slax57
Successfully merging a pull request may close this issue.
What you were expecting:
According to Prefilling the Form document, create form should be filled with the values provided.
What happened instead:
Location's state is null and inputs are blank.
Steps to reproduce:
Use a customized create button with state or search.
Related code:
https://codesandbox.io/s/ancient-worker-jlmxgn?file=/src/posts/PostActions.js
Environment
The text was updated successfully, but these errors were encountered: