This repository was archived by the owner on Aug 23, 2022. It is now read-only.
Releases: davidkpiano/react-redux-form
Releases · davidkpiano/react-redux-form
v0.12.1
- Fixed issue with
<Form>
not "invalidating" validity after change after submit failed. That's a mouthful, so see the video for a demo of the issue: http://cl.ly/g561 - Fixed #188 where some functions were being overeagerly memoized in the sequence mapping. Memoization removed for now.
React Redux Form v0.12.0
Controlled Text Components
- The biggest change of
0.12.0
is that text components (e.g.,<input type="text" />
and similar) are now controlled components... - ... but ONLY if
updateOn="change"
(which is the default). In1.0.0
(or perhaps a0.12.x
patch) there will be a solution for controlled components that alsoupdateOn="blur"
, but this currently is not the most common use case. - So,
updateOn="blur"
will remain uncontrolled.
Bug Fixes
- Many fixes regarding the
<Field>
component andReact.Children.only
. - Errors can now be plain strings without accidentally getting converted to error arrays. (not a listed issue)
- The behavior for removing nonexistent fields in the
formReducer
is now mostly as expected; this will be greatly refactored (and simplified) in1.0.0
.
v0.11.6
- Fixed the elusive issue regarding
React.Children.only
inside<Field>
components: #170 - Fixed (mitigated) the issue where items removed from an array were being incorrectly persisted in the form reducer, causing fields to incorrectly remain valid.
Note: The form reducer will undergo a huge refactor for v1.0. The only difference will be in syntax for retrieving fields, and will allow for greater integrity between the model and the form in properly tracking values to avoid issues such as #170. Furthermore, it will allow extensibility to add transformers/plugins for custom form behaviors.
v0.11.5
- Fixed
.retouched
flag on form not being set totrue
when any of its fields have been.retouched
- Fixed
"Cannot read property 'valid' from undefined"
stray error (caused when null values are in store)
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!
v0.11.2
- This fixes intermittent validation issues caused by
validators
on<Form>
not always representing the correct validation state of the fields. No issue for this one.
v0.11.1
React Redux Form v0.11.0
Validity and Error Actions Behavior
- This version changes (fixes?) the behavior with
setValidity
andsetErrors
such that it sets the validity/errors of the model, rather than merges it in. This shouldn't affect most forms, but was a large enough change/refactor to warrant a minor version bump. See #151 for more info.
Behind The Scenes
- There is an internal
<Control>
component that<Field>
uses that have both been refactored internally. The<Control>
component will be exposed in v1 and will allow more granular control for custom controls! - Many functions are now being memoized, and many more to come!
- More actions (especially around validity) are being batched, meaning less re-renders to improve performance
- Many added unit tests to ensure stability.
React Redux Form v0.10.5
Internal Enhancements
- The
submit()
action now batches actions (with performance/rendering benefits):setSubmitted
andsetValidity
are batched when the form is validsetSubmitFailed
andsetErrors
are batched when the form is invalid
- The
peerDependencies
inpackage.json
has been updated to includereact-dom
andredux-thunk
.
v0.10.4
Ninja Renaming
validateErrorsFields
has been renamed tovalidateFieldsErrors
to remain consistent withsetFieldsErrors
.