Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Releases: davidkpiano/react-redux-form

v1.11.2

30 May 02:37
Compare
Choose a tag to compare

Fixes and Enhancements

  • The onKeyPress handler (passed to <Control>) is now executed before anything else happens internally. See #790 for how this is useful.
  • Typescript def updates: #795 #794 #797
  • Doc updates: #800
  • If you are using debounce, any debounced changes will now automatically be "flushed" (i.e., dispatched immediately) whenever the <Control> is about to be unmounted. #799
  • Pressing Enter inside an input will now force validation/updating to occur, even if the control has updateOn="blur". See #777 for the use case that this accommodates.

🇺🇸

v1.11.1

18 May 04:23
Compare
Choose a tag to compare

Lots of little (but important) fixes and updates here!

  • Clarified docs and FAQ around controls of different types. #717
  • Added missing type definition for <Control.custom>. #756
  • Added missing argument for typedef of onSubmit for <Form> components in e8b85a0
  • An internal caching mechanism was removed (due to a few edge-case bugs) and a bug was fixed around dispatching setInitial. #782
  • The state is now passed to comparison logic in shouldComponentUpdate, thanks to @dreid #758
  • Various doc updates thanks to @romseguy - #761, #762
  • Badge added thanks to @sufuf3 - #768
  • If an actions.change action is dispatched, now the form will apply the change first before applying any other updates (which is the expected behavior). - #784

v1.11.0

18 Apr 15:02
Compare
Choose a tag to compare

This is an exciting release!! There's a few new features, bug fixes, and huge performance enhancements.

  • Huge performance improvements thanks to @danielericlee in his PR: #755 👏
    • Uses the new areOwnPropsEqual and areStatePropsEqual options in React-Redux to do smarter shouldComponentUpdate testing
  • Documentation updates:
    • Quick code example fix in #754
    • Referenced <Control.custom> in the Control docs
    • Added some new FAQs - check them out!
  • No more storeSubscription warnings will occur in <Fieldset>. #750
  • track() now handles multi-value models correctly; e.g., track('users[].pets[]', {id: 100})
  • The <Form onSubmit={(val, evt) => ...}> prop now takes the event as the second argument, which makes things like file uploads much easier. #664

v1.10.2

11 Apr 16:34
Compare
Choose a tag to compare

This reverts the previous patch - standard prop mappings (such as onChange, onBlur, etc.) will be passed onto <Control> components with custom components, as expected. See #743 for why that was important.

If you do not want any standard property mappings (such as onChange, onBlur, etc.) passed down to your custom control component, use <Control.custom> and define your own mappings:

<Control.custom
  component={SpecialCustomText}
  mapProps={{
    onTextChange: (props) => props.onChange,
    onLoseFocus: (props) => props.onBlur,
    // etc.
  }}
/>

v1.10.1

11 Apr 01:35
Compare
Choose a tag to compare

This small patch ensures that the default mapping of props for common <input> components are not passed down for custom controls defined like <Control component={CustomControl}>.

v1.10.0

11 Apr 01:34
Compare
Choose a tag to compare

Enhancements and Fixes

Lots of updates in this minor version bump!

  • The logic for the value of <Control.text> components was improved (see 8579917 for the technical details) in order to quell some of the "component is switching from uncontrolled to controlled" errors.
    • If the value is undefined, an empty string is rendered instead.
    • Otherwise, the normal text value (string) of the modelValue is rendered, as usual.
    • For <Control> (default control), the value is not messed with. It is up to your custom component to do proper value checking.
    • Related to #714, #733, #739
  • Small dependency updates (#738) and tsdef updates (#740)
  • The getValue prop, once internal, is now exposed to <Control>. See the docs for more info.
  • Because of this, Control.checkbox was refactored which solves #725. The isToggle prop is also exposed, which lets you indicate whether the control acts like a "toggle" (that is, its value remains the same but it affects the overall model value, like a checkbox or radio button).
  • React 15.5 came out which deprecated the internal use of React.PropTypes, so that was taken care of.

v1.9.0

06 Apr 16:00
Compare
Choose a tag to compare

Enhancements

<LocalForm> now provides a thunk-enabled dispatcher for getDispatch! This means you can pass in action thunk creators, like:

// in render():
<LocalForm
  model="user"
  getDispatch={(dispatch) => this.formDispatch = dispatch}
/>

// anywhere in the same component:
this.formDispatch(actions.merge('user', {
  name: 'Jared',
  state: 'Pennsylvania'
});

Very little code was required to make this happen, so don't worry, it doesn't create a dependency on redux-thunk -- it works the exact same way, though.

Fixes

  • HTML validation was fixed in components defined in <LocalForm> components. #734

v1.8.3

05 Apr 15:08
Compare
Choose a tag to compare

Fixes

  • In edge cases, an infinite loop previously occurred, related to dispatching clearIntents. This has been
    fixed (bb23082) 😅
  • Fix for #722 via PR #727 thanks to @peterox

More enhancements coming soon!

v1.8.2

29 Mar 14:15
Compare
Choose a tag to compare
  • Using defaultValue in <Control> components will no longer throw an error. While discouraged, defaultValue can still be used to load the initial state onto a model as expected. #630
  • Using a customInitialFieldState will now work for all actions in the form reducer. #713
  • Docs improved for mapProps, thanks to @nigredo-tori #712
  • Type refs updated for setErrors and setFieldsErrors - #710
  • To prevent infinite loops, validation logic for handling async validation when a form's field changes has been moved to the form reducer itself. #706
  • A lot of CLEAR_INTENTS noise was cleared up - now, actions can dispatch with .clearIntents metadata, which will be handled correctly by the reducer, and make the logs cleaner.

React Redux Form v1.8.1

17 Mar 15:04
Compare
Choose a tag to compare

Enhancements and Fixes

  • Adding model caching and properly removing form values with updated field models. See #619 for more details.
  • The stray console.error was removed from actions.submit. Make sure you properly handle errors in your promises! #697
  • The prop warning for storeSubscription should no longer be shown anymore 🎉 #698
  • Small TS definition updates for combineForms and createForms. #699
  • Custom controls will no longer coerce non-strings to empty strings. #708
  • The documentation was updated to note the subtle difference between actions.load and actions.change(model, { silent: true }). In case you're curious:
    • both .load and .change (silent) will silently change the value.
    • only .load will also set the .loadedValue, which is the value that the control will be reset to upon actions.reset(model).