This repository has been 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.8.0
React-Redux Fixes
This is a minor push mainly because issues with the newest major version of react-redux@5
broke some of the functionality with <LocalForm>
. Thankfully, it's been fixed! Details here: reduxjs/react-redux#589
Fixes and Enhancements
- Both
controlProps
and props defined directly on the<Control>
can now be safely used together - they won't override each other, as the default behavior is to instead merge those props directly to the rendered control. #680 - Small fix to prevent a warning by preventing passing the
storeSubscription
prop to<form>
(related toreact-redux@5
). #623 - Some sanity checking for
form.$form
to see if it's undefined done by @tonaphone #681 - An issue with event persisting that broke debouncing has been fixed: #690
React Redux Form v1.7.0
Performance Improvements + Optimizations (bf53863)
actions.promise
will now treat rejected promise errors as async errors- model actions are now considered "external" by default - only when they are called within a
Control
event handler are they considered internal. - no validation will occur on
Control
components if there are novalidators={...}
orerrors={...}
props. - no validation will occur on
Form
components if there are novalidators={...}
orerrors={...}
props unless the form is made invalid (due to async validity) - then the validity will become valid again on next validation. - all validation originating from
Form
components are merged by default with field-level validation, instead of overwriting it. - (internal)
isValid()
correctly handles async simple validation (strings, boolean, etc.) - no ‘validate’ intent will be pushed if
actions.change
is not external (originated fromControl
). This saves a render!
Documentation Updates
- Quick Start guide updated to clarify when you still need to use
redux-thunk
(which, for most use cases, you don't need to). #655 - Quick Start guide also updated to clarify when you would use
dispatch
inhandleSubmit()
. #674 - Lots of other small documentation updates: #673, #675, #676
Fixes and Enhancements
- 🆕 The
<Control persist={true}>
prop now persists validity, even when the control is unmounted. This can be useful when you have multi-part forms and you need to go back to a previously rendered form, but want to remind the user what the errors currently are. #594 - Using
<Control mapProps={{...}}>
on a plain<Control>
will now behave with the same extend-like behavior in<Control.text>
,<Control.radio>
, etc. #653 - 🚧 A stop-gap temporary
<Form onBeforeSubmit={(event) => {...}}>
prop will let you handle the event directly on every form submit. This will be fixed more holistically in version 2.0. #637
React Redux Form v1.6.0
React Native
- The biggest fixes in this release were for React Native. Now,
react-redux-form/native
targetsreact-redux-form/lib/native
, which is the ES5-compiled version of React Redux Form Native. #654 - Also,
mapProps
in React Native will now extend the existing control'smapProps
, just like the normal version does. #659
Other Enhancements and Fixes
React Redux Form v1.5.5
🏀 Debouncing! 🎾
- The
debounce={...}
prop is now available on<Control>
components, which allow you to change models only after a certain amount of time (in milliseconds) has elapsed since the last change. TheviewValue
, as always, updates immediately. #587
<Control.text model="user.name" debounce={300} />
- You can now use the
{ lazy: true }
option (and any futureformReducer
options) incombineForms
as the thirdoptions
argument. #422 - TypeScript definition updates: typedef for
<Fieldset>
(#642) and a small edit togetRef
(#638) track()
now works as expected in Immutable.JS contexts. #644- A large amount of refactoring and clean-up was done for validation logic in
<Form>
. No external APIs were changed.
React Redux Form v1.5.4
Enhancements
- If you're using
redux-thunk
(optional), you can now pass a function intoactions.change
:
dispatch(actions.change('user.name', (name) => name.toUpperCase()));
- 🆕 the
<Control>
component now takes awithField={true}
prop that will pass the field value to the event handlers as the second prop. Default:true
. - Various TypeScript defs updated
- Preact compatibility improvements thanks to @marsch: #633
- Docs: clarification that you can use any standard props, as they will be passed right to the vanilla control. #628
- Docs: added info on how to (easily!) submit a form programmatically in React-Native. #625
Fixes
1.5.2
React Redux Form v1.5.1
Fixes and Enhancements
- We can't assume that server-side APIs are idempotent - most of the time, they're not. Because of this, forms will now successfully submit if their sync validity is valid -- that is, if their async validity is invalid, it will still submit. See #567 for more info.
- You can now
import { Fieldset } from 'react-redux-form/immutable'
for convenience - it is the exact same component as the standard library. #595 - The docs were also updated to fix a missing parenthesis. Thanks, @L1br3! #593
React Redux Form v1.5.0
Fixes and Enhancements
- Validation gets tricky when unmounting controls with validators. Now, validation will not override previous validity when unmounting - it will only reset its own validators and any HTML5 validation attributes. See #580 and #584 for more information. Thanks @dave-clover!
- You can now use a single function in
<Form validators={(values) => ...}>
!! 🎉 Thanks @sl33kr! #578 - If you have validators defined on both field/control and form, now they won't overwrite each other. Thanks, @sl33kr again!
- You can now define your own
controlPropTypes
increateFieldClass
, if you are using it (it is recommended to useControl
instead) - No more unexpected behavior will occur if you define
type="radio"
ortype="checkbox"
on a custom component. #575 - Deep loading behavior now works, so that you can deeply load values and have those loaded values replaced on reset. #571
Don't worry, all changes in this minor release are internal, and no external API was harmed in the making of this release. 😄
React Redux Form v1.4.4
Fixes and Enhancements
- Tests updated to be fully compatible with
react-redux@5
! - The
for...of
syntax inpick.js
was problematic with old versions of IE and older versions of Chrome, so it was refactored.
React Redux Form v1.4.3
- The removal of
value
introduced in 1.4.2 could be seen as a breaking feature, albeit being undocumented. For this reason, its removal was reverted and now it's back in the form and field states. Phew!