-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Initial Values are not showing up in ReferenceArrayInput on second render. #4203
Comments
Thanks for the issue. |
Either I don't understand this bug, or it's been fixed in the meantime. I don't see any initialValue in your CodeSandbox. I don't see any problem when displaying the CommentCreate page for the second time. Can you rephrase and recheck your CodeSandbox? |
@fzaninotto The code sandbox was broken since the way we pass defaultValue to I've fixed the code sandbox. Now you can follow the exact same steps mentioned in the description of the issue to reproduce. Let me know if you need more info. Regards, |
…input.value is undefined. Closes marmelab#4023[marmelab#4203]. Issue was caused by useField hook of final-form returning defaultValue of field as undefined (when it is not yet available in state) while enhancing the parent input. useInput hook of react-admin is considering same enhanced input with value undefined while rendering the children.
…input.value is undefined. Closes marmelab#4023[marmelab#4203]. Issue was caused by useField hook of final-form returning defaultValue of field as undefined (when it is not yet available in state) while enhancing the parent input. useInput hook of react-admin is considering same enhanced input with value undefined while rendering the children.
…input.value is undefined. Closes marmelab#4203[marmelab#4203]. Issue was caused by useField hook of final-form returning defaultValue of field as undefined (when it is not yet available in state) while enhancing the parent input. useInput hook of react-admin is considering same enhanced input with value undefined while rendering the children.
…input.value is undefined. Closes marmelab#4203 Issue was caused by useField hook of final-form returning defaultValue of field as undefined (when it is not yet available in state) while enhancing the parent input. useInput hook of react-admin is considering same enhanced input with value undefined while rendering the children.
In your example, you're using a |
The bug comes from the fact that you placed the defaultValue in the SelectInput rather than the ReferenceArrayInput. I understand that you did that because the referenceArrayInput defaultValue was ignored. It is now fixed in #4641. |
What you were expecting:
Expect the initialValue to be displayed on every render
What happened instead:
initialValue is not showing on second render onwards.
Steps to reproduce:
https://codesandbox.io/s/cool-dust-72uir
Environment
The text was updated successfully, but these errors were encountered: