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.16.2

30 Nov 15:32
Compare
Choose a tag to compare
  • Subfields are now properly revalidated after change. #1020
  • React native fixes: #722 (PRs: #1022, #1025)
  • Documentation fixes: #1031
  • Fix setInitial form state shape malformation (#1006)

v1.16.0

03 Nov 03:55
Compare
Choose a tag to compare
  • shallow-compare updated for React v16 compatibility. #987
  • #988 (intent clearing bug) fixed by @kabbi
  • Nodes are now allowed for message values in <Errors messages={...}/>. #990
  • 🆕 You can now use a formatter prop with <Control>! #985
const formatValue = val => val.toUpperCase();

// ...

return (
  <Control.text
    model="foo.bar"
    format={formatValue}
  />
);
  • Parser documentation updated - it only takes one value, not two.
  • React Native findDOMNode issue (#792) fixed by @peterdivvito: #998
  • Other TypeScript definition and small doc updates.

v1.15.0

21 Oct 12:13
Compare
Choose a tag to compare
  • Documentation fixes thanks to @ralphstodomingo - #973 #974 #976
  • Fixed bug that prevented passing options to actions.merge, thanks to @tylercrompton #979
  • Fixed bug with validation on change where Object.keys called on undefined #983
  • 🆕 Added fieldValue to mapped props when withFieldValue provided to <Control>, so now you can have this:
<Control.custom
  model="foo.bar"
  component={MyInput}
  withFieldValue
/>

and that will pass fieldValue as a prop directly into your <MyInput> component. See #984

v1.14.5

13 Oct 02:10
Compare
Choose a tag to compare

This patch is mainly for #970, since 1.14.4 was breaking some builds.

v1.14.2

24 Sep 13:23
Compare
Choose a tag to compare

Fixes and Enhancements

  • <Control.textarea updateOn="blur"> will no longer trigger a change when the enter key is pressed. #930
  • <Control.checkbox> with defaultChecked now works properly, thanks to @maludwig, along with other fixes: #905, #908, #922, #928
  • Ensured that debounce="..." flushing does not occur more than once. #951 #884
  • 🆕 the isValid utility is exposed, which makes it much easier to determine if an entire form is sync/async valid:
import { isValid } from 'react-redux-form';

// inside a connected component

// `forms` is retrieved directly from the store, e.g.:
// connect(state => ({
//  forms: state.forms
// }))(YourComponent)
const { forms } = this.props;

// true if form and all subfields are valid
const valid = isValid(forms);

// true if form and all subfields are valid, ignoring async validity
const syncValid = isValid(forms, { async: false })

v1.14.1

18 Aug 16:02
Compare
Choose a tag to compare

Fixes and Enhancements

  • 🆕 New component: <Control.password /> which creates an <input type="password" /> component! #739
  • RRF now uses PureComponent, which was introduced in React 15.3.0 (released many months back). If, for some reason, you depend on an older version of React (especially 0.14.0), please stay with RRF 1.14.0.
  • onUpdate and onChange are no longer called when the form first loads. This was considered a bug and should not be a breaking change. #907

v1.14.0

27 Jul 13:59
Compare
Choose a tag to compare

React v16 compatibility 🎉
Since React v16 has been announced in public beta, the peer deps were updated to ensure that React-Redux-Form will be compatible with React v16! If you see any bugs that aren't directly related to the React v16 beta, please file an issue.

Fixes and Enhancements

  • If a control needs validation triggered, such as after being reset, now HTML5 validity is properly taken into account as well. #836
  • 🆕 New prop: <Form hideNativeErrors>! One annoying issue (#823, #889) was that it was not easy to hide native HTML5 validation error messages shown by the browser (those bubbles that pop up when you try to submit a form). Most of the time though, you want to know when a field is invalid but show your own custom error messages.

The hideNativeErrors prop can be used to indicate that you do not want native HTML5 constraint validation messages appearing. This will still retain the behavior that if a control is invalid due to HTML5 validation, the form will fail to submit:

// native errors will NOT show
// <Errors /> will show when touched (or submit button clicked) as expected
<Form model="user" hideNativeErrors>
  <Control.text
    model=".email"
    type="email"
  />
  <Errors
    model=".email"
    messages={{
      valueMissing: 'Hey, where is your email?',
      typeMismatch: 'Not a valid email!'
    }}
    show="touched"
  />
  <button>Submit!</button>
</Form>

See the FAQs for more information.

  • A debounced control will no longer "flush" (that is, automatically apply a debounced change) when it is cancelled (due to reset). #884

Please make sure that you include reproducible code examples with all issues! It's in the issue template; I even wrote out most of the code in a CodePen template. No excuses 😉

v1.13.0

03 Jul 13:10
Compare
Choose a tag to compare

Documentation

  • The Quickstart Guide has been updated to show how to integrate RRF into existing projects that have an existing store/reducers. #845
  • Sections added to FAQs:
    • "How do I hide native HTML5 validation messages, and still prevent the form from submitting if invalid?" #823
    • "With partial models, how do I get the fully resolved model string?" #751
  • Documentation for <Form onBeforeSubmit={...}> and clarification for validateOn prop added. #854
  • The debounce prop has been added to the Control docs #861
  • More clarification and advanced use-cases of React Native have been added to the docs, thanks to @andrewhl #847

Fixes and Enhancements

  • Avoid storeSubscription from being passed down as props to Field. #835
  • (internal) Check if async keys is array before searching for error key #818 #837
  • Ensuring "iteratee" pattern follows Immutable strategy to prevent Immutable errors. #846
  • Typescript typedef updates: #859

⚠️ Important Note About Issues ⚠️

Please, please 🙏 make sure that there is a reproducible code example on every issue - it makes it a lot faster for me to debug and fix the issue as soon as possible, and it's just courteous - if I'm going to spend a half hour fixing an issue and adding unit tests, you can spend five minutes (max!) creating a reproducible issue.

  • Codepen template that you can fork from 🍴
  • Code Sandbox also makes it really easy to create reproducible examples.
  • If you want, you can also make a Github repo and point me to it.

Any issue without a fully reproducible code example will be immediately closed until an example is provided. Thanks for understanding!

v1.12.1

09 Jun 13:15
Compare
Choose a tag to compare

HTML5 Constraint Validation Enhancements
There's two special attributes related to validation and form submission in the HTML5 Constraint Validation spec:

  • <input formNoValidate>, which will not prevent the <form> from submitting even if it's invalid
  • <form noValidate>, which will always submit, even if a control is invalid.

In this patch, these attributes will now work as expected, according to the spec. See here for a detailed explanation (which will be added to the docs): #823 (comment)

Fixes and Enhancements

  • Doc updates for a11y which address #825. Make sure to always have either:
    • <label htmlFor="some-control-id"> on your labels, or...
    • wrap your control in a <label> for implicit linking.
  • Fixed a bug where the development version of React was passing two arguments to event handlers, which was conflicting with an internal forceUpdate mechanism. #831
  • Now, arrays and objects passed in as validity will be merged, instead of overwritten. See #834 for the use case.
  • Thanks to @kabbi for fixing resolveModel context propagation issues (internal) - #815

v1.12.0

03 Jun 21:21
Compare
Choose a tag to compare

Fixes and Enhancements

The main fixes for 1.12.0 are around the behavior for actions.reset. No existing, documented behavior has changed, but it has been reported that the action wasn't fully resetting forms. Specifically, if you have a form where dynamic fields are created inside, the "initial value" was erroneously updating to reflect those new fields, when it should really stay the same (hence "initial" 😂).

See #791 and #798 for more info, and dc26cf1 for the (really small) fix and unit tests.

Below are the main fixes from 1.11.3 and 1.12.0:

  • IE11 doesn't like Object.assign, and is weird about Object.keys, so that's been refactored. #806 #816
  • Typings updates: #804, #806
  • Fixing a small issue with debouncing and flushing. #813
  • Dynamic models now work as expected in <Control>, thanks to @kabbi - #812
  • Adding the type attribute to <Control.text type="..."> now works as expected, instead of the type being forced to "text", which was the original (incorrect) behavior. #814
  • If you want to run async validators at the same time as sync validators, now they will run as expected even if the field is invalid. #817
  • Fix for actions.reset(), as stated above.