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

Make useInput hook return child's input.value when parent's enhanced … #4638

Conversation

prasanna214
Copy link

@prasanna214 prasanna214 commented Apr 4, 2020

…input.value is undefined.

Closes #4203

Issue was caused by useField hook of react-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.

@prasanna214 prasanna214 force-pushed the 4203-initial-value-render-issue branch from 827db44 to 246906b Compare April 4, 2020 08:14
…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.
@prasanna214 prasanna214 force-pushed the 4203-initial-value-render-issue branch from 246906b to e63fc7a Compare April 4, 2020 08:15
@fzaninotto
Copy link
Member

I came wit han entirely different (and more lightweight) solution to fix #4203. See #4641, which supersedes this PR.

@fzaninotto fzaninotto closed this Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initial Values are not showing up in ReferenceArrayInput on second render.
2 participants