This repository was archived by the owner on Aug 23, 2022. It is now read-only.
React Redux Form v0.11.4
Bug Fixes
- #84 re-addressed - the form reducer will now reset fields to the
initialFieldState
whenever they are removed. This will mitigate validation issues. - The
<Errors>
component will now properly handle single-string errors. <Errors model="..." />
will also work now with deep form paths.getForm
has been refactored to improve this behavior (internal).
Features
- The
show={...}
prop of the<Errors>
component will now provide the form value as the second parameter:
<Errors model="foo.bar"
show={(field, form) => field.touched || form.submitFailed}
/>
- (Undocumented) experimental support for shortcut functions
modelFormReducer(...)
andmodelForm(...)
:
import { modelFormReducer } from 'react-redux-form';
const reducer = combineReducers({
user: modelFormReducer('user', initialUserState),
// ... etc.
});
// will produce this state shape:
{
user: {
model: // result from modelReducer
form: // result from formReducer
}
}
If you want to try this out, please let me know if it's useful!