This repository was archived by the owner on Aug 23, 2022. It is now read-only.
React Redux Form v0.9.4
New Actions
actions.batch
- mostly internal, this action allows multiple actions or action thunks to be batched into a single action that is understood by both the model and form reducer. This is a performance enhancement that can prevent multiple renders from occurring in the UI.actions.validateFields
- explicit action created for validating fields of a form. Takes in three arguments:model
- the model to validatefieldValidators
- an object where the keys are the field paths (such as"email"
foruser.email
), and the values are validators (either functions or a validation object)callback
(optional) - a callback that is executed if themodel
is valid.
actions.move
- model action that allows you to move an item in an array from index A to index B. Takes in three arguments:model
- the array to manipulatefromIndex
toIndex
actions.load
- similar toactions.change
, but changes the model without triggering a "change" in the form reducer. Good for initializing values dynamically/asynchronously. Takes in two arguments:model
value
Field Fixes and Improvements
- Now, pressing the
Enter
key in a control inside of a<Field>
will trigger achange
before submitting the form. This is useful if you pressEnter
inside of anupdateOn="blur"
field. - The actual updated model values are now passed into
<Field>
validators instead of the event value.
Form Fixes and Improvements
- Now, the actual form state will be used for checking if a
<Form>
is valid. This means that any validator can be used to update the validation state inside<Form>
, which preventsonSubmit
if the form is invalid. This includes:- validators inside
<Field>
- validators dispatched from actions
- validators inside