Closed brycesenz closed 6 years ago
LGTM - once the linting errors are fixed (max-length for lines) I'll merge this in. Thanks!
@davidkpiano - linting issues fixed; we should be good to go. Thanks for the quick review, and thanks again for such an awesome library!
Fixes the issue described here - https://github.com/davidkpiano/react-redux-form/issues/924
Without understanding the internals in too much depth, it looks like
formStateKeyCache
was introduced as a way to track which parent form relationships for the models provided onField
attributes, in a way that would allow bothFields
andForms
to use thatget-form
utility class.Where this seems to break down is that for form-level models that aren't present at initialization, they never get the proper form structure in redux.
This PR addresses that by resetting the cached data form the provided model string, but only within the form component, and only when the state is being mapped to that model initially.