fix(HiddenField): make sure form state is always updated when `defaultValue` changes
No story here, as the HiddenField
is... well... hidden
Fixes the bug in portal#458 (closed), we use a HiddenArrayField
in UsersList
. After removing a user the HiddenArrayField
component of this user is cached by React and after adding a new (different) user the cached component is reused by React (as the same kind of component is used), just with different props passed in (in this case defaultValue
). And since before this commit the changes in defaultValue
were not resulting in the form state being updated, this lead to the bug we experienced.
Edited by François Martin