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

Releases: davidkpiano/react-redux-form

React Redux Form v1.0.10

11 Oct 20:50
Compare
Choose a tag to compare

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

10 Oct 14:41
Compare
Choose a tag to compare

🎉 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 as show={...}. #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

06 Oct 12:56
Compare
Choose a tag to compare

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

05 Oct 00:54
Compare
Choose a tag to compare

Documentation

Bug Fixes

  • Deep fields are now properly reset to their initial values when the parent form is reset. #439
  • Validation now reflects the current model's value instead of the event value when validateOn is not the same as updateOn. #428

React Redux Form v1.0.6

03 Oct 14:11
Compare
Choose a tag to compare

Fixes and Enhancements

  • You can now map fieldValue inside mapProps! 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

01 Oct 05:14
Compare
Choose a tag to compare

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 proper initialState), 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>'s shouldComponnetUpdate function that ignores the mapProps prop (which is assumed to be static. The dynamic way of defining mapProps was deprecated.) #427
  • The getField and getModel 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

30 Sep 04:43
Compare
Choose a tag to compare

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

27 Sep 16:39
Compare
Choose a tag to compare

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 and viewValue.

React Redux Form v0.14.6

13 Sep 15:05
Compare
Choose a tag to compare

Validation Fixes

  • The <Form> component now properly revalidates when its actual validators are changed. #377
  • Also, the <Form> will now immediately submit after initially being invalid from a previous submit attempt. #395

React Redux Form v0.14.5

31 Aug 16:08
Compare
Choose a tag to compare

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>
  • Props in Field are now whitelisted instead of blacklisted when passing props to the internal Control component: #349
  • The parse function in <Field> is now called for the initial value, if it is different than the initial value. #379