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
React Redux Form v1.0.10
Tiny patch this time to quickly fix a few issues:
Bug Fixes
- The
SUBMIT_FAILED
action now propagates to child fields, so that.submitFailed
can be read in them and their parent form accurately. #462 - An edge-case appeared in local tests where
cannot read "value" of undefined
was caused when deeply changing values. This issue is fixed.
React Redux Form v1.0.9
🎉 Milestones 🎉
- 1,000 commits!
- Over 1,000 unit tests!
- Almost 1,000 stars? Spread the word! 😉
Enhancements and Fixes
- Fixed bug where a form was considered valid if all of its fields were valid, even though (by its own validity) it is invalid. #450
- The
shouldComponentUpdate
logic was modified in<Errors>
to handle dynamic properties, such asshow={...}
. #444 - Parsing now correctly occurs when you press Enter on a control; that is, when you submit the form from a control. #451
- TypeScript definition file updated - thanks @BrianDGLS! #456
- Internal
getFormStateKey
now targets the most specific form state, instead of the most general form state. #455 - Custom
changeAction={...}
now works in<Control.checkbox />
. #440 - Lots of Immutable.JS compatibility work in progress by @erin-doyle! Huge thanks! #457
React Redux Form v1.0.8
New Function: createForms
If you wanted to use combineForms
with combineReducers
(from Redux) but didn't want to nest it in a property, now you can with createForms
, which returns an object containing the mapped model and form reducers:
import { combineReducers } from 'redux';
import { createForms } from 'react-redux-form';
const initialUserState = {};
const initialGoatState = {};
const reducer = combineReducers({
foo: fooReducer,
bar: barReducer,
...createForms({
user: initialUserState,
goat: initialGoatState,
}),
});
// reducer state shape will be:
// {
// foo: fooReducer,
// bar: barReducer,
// user: modelReducer('user', initialUserState),
// goat: modelReducer('goat', initialGoatState),
// forms: formReducer(''),
// }
See #421 for more info, as well as the docs: https://davidkpiano.github.io/react-redux-form/docs/api/createForms.html
Bug Fixes
- Edge case fixed where the view value was not being properly parsed after a certain point. #447
React Redux Form v1.0.7
Documentation
- Form docs added: http://davidkpiano.github.io/react-redux-form/docs/api/Form.html
- Added section on form-wide errors for Errors docs: http://davidkpiano.github.io/react-redux-form/docs/api/Errors.html
- Various typo fixes: #442
Bug Fixes
React Redux Form v1.0.6
Fixes and Enhancements
- You can now map
fieldValue
insidemapProps
! This provides you the following field props that you can use in your custom component (#433 for more info):- focus
- pending
- pristine
- submitted
- submitFailed
- retouched
- touched
- valid
- validating
- validated
- validity
- errors
- Support for
react-redux
v5 added, thanks to @vladshcherbin (#434) - 🚧 Immutable.JS support is in progress! 🚧 Huge thanks to @erin-doyle for undertaking the majority of this effort! #319
React Redux Form v1.0.5
Fixes and Enhancements
- An edge-case bug was fixed (before anyone reported it) where dynamically creating a new grandchild field (e.g., with
dispatch(actions.focus('this.field.does.not.exist.yet'))
) was erroneously re-validating the entire form. This would never occur with non-dynamic fields (i.e., given a properinitialState
), but was fixed for the edge cases. - 🚧 Huge performance improvements! 🚧 Still a work in progress, the first improvement that showed a sizable reduction in rendering time was a change to
<Control>
'sshouldComponnetUpdate
function that ignores themapProps
prop (which is assumed to be static. The dynamic way of definingmapProps
was deprecated.) #427 - The
getField
andgetModel
utility functions are now exposed (#424):
import { getField, getModel } from 'react-redux-form';
// ...
const mapStateToProps = (state) => ({
user: getModel(state, 'path.to.user'),
nameField: getField(state, 'path.to.user.name'),
});
// ...
React Redux Form v1.0.4
Fixes and enhancements
- The validity of a rendered
<Control />
is properly determined after its form or model is reset. That way, fields won't magically become valid again after a reset if they have validators that wish to render it initially invalid. #418 - Validity will no longer be accidentally set on non-existent fields right after they've been deleted. #425
- The
.pristine
property of a parent.$form
now reflects the pristine state of its fields. If all of its fields are pristine, then.$form.pristine === true
. Otherwise,.$form.pristine === false
. #429 - A bunch of internal cleanup and tiny optimizations for updating parent forms!
React Redux Form v1.0.3
Changes since 1.0.0
- React Native paths fixed and
.babelrc
ignored in.npmignore
so that it will now work smoothly in React Native. - Async validators will no longer run if the field is invalid due to sync validity. This saves extraneous XHR requests and other potential validation race-condition issues. #329
react-redux
dependency removed from the core build (was erroneously included), which saves quite a few KB! 😅
Documentation
- Custom Controls documentation updated to explain distinction between
modelValue
andviewValue
.
React Redux Form v0.14.6
React Redux Form v0.14.5
Fixes and Improvements
- Error messages in
<Errors messages={{...}}>
can now be customized via a function that takes in the model value and the error (#347):
<form>
<Errors model="test.foo"
messages={{
length: (val, {length}) => `${val && val.length} chars is too short (must be at least ${length} chars)`,
}}
/>
<Field model="test.foo"
errors={{
length: (v) => v && v.length && v.length > 5 ? false : {length: 5},
}}
>
<input type="text" />
</Field>
</form>