This repository was archived by the owner on Aug 23, 2022. It is now read-only.
React Redux Form v0.9.6
New Actions
actions.setSubmitFailed(model)
- Sets the.submitFailed
property of the field/form component totrue
.
New Action Behavior
actions.submit(...)
will now dispatchactions.setSubmitFailed(...)
upon a promise failure. The state behavior is maintained with regard topending
andsubmitted
, with the addition ofsubmitFailed
being set totrue
.
Field Component Enhancements
- Now it's possible to add custom event handlers directly on the
onChange
,onFocus
, andonBlur
props of controls inside of<Field>
, which will be called before any other RRF-specific action is dispatched:
// Will alert "I am changed!" and then proceed with dispatching
// a change action for foo.bar.
<Field model="foo.bar">
<input type="text" onChange={() => alert('I am changed!')} />
</Field>
Form Reducer Deprecation Warnings
The following redundant field/form properties will be deprecated as of v1.0
:
blur
- use the inverse offocus
insteaddirty
- use the inverse ofpristine
insteaduntouched
- use the inverse oftouched
instead
When getting these properties, a deprecation warning will appear in the console. These are deprecated in favor of the positive counterparts, and will improve performance slightly as the field/form objects become less property-heavy.