Skip to content

Commit

Permalink
v7.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
erikras committed Jan 18, 2018
1 parent 6357a5d commit 4d8f41b
Show file tree
Hide file tree
Showing 74 changed files with 1,143 additions and 1,203 deletions.
1 change: 1 addition & 0 deletions .prettierrc
@@ -1,3 +1,4 @@
semi: false
singleQuote: true
trailingComma: none
printWidth: 80
14 changes: 6 additions & 8 deletions README.md
Expand Up @@ -21,9 +21,7 @@ enable an html form in [React](https://github.com/facebook/react) to use

## Sponsorship

Redux-form is proudly sponsored by [Rollbar](https://cs.berry.sh/c/1c4ce130-ac45-48c2-a057-ecce3b62b8e4
). They provide real-time error monitoring, alerting, and analytics for developers. [Try Rollbar for free](https://cs.berry.sh/c/1c4ce130-ac45-48c2-a057-ecce3b62b8e4
).
Redux-form is proudly sponsored by [Rollbar](https://cs.berry.sh/c/1c4ce130-ac45-48c2-a057-ecce3b62b8e4). They provide real-time error monitoring, alerting, and analytics for developers. [Try Rollbar for free](https://cs.berry.sh/c/1c4ce130-ac45-48c2-a057-ecce3b62b8e4).

![](https://cs.berry.sh/l/1c4ce130-ac45-48c2-a057-ecce3b62b8e4/pixel.png)

Expand All @@ -33,12 +31,12 @@ Redux-form is proudly sponsored by [Rollbar](https://cs.berry.sh/c/1c4ce130-ac45

## Documentation

* [Getting Started](https://redux-form.com/7.2.0/docs/GettingStarted.md/)
* [Examples](https://redux-form.com/7.2.0/examples/)
* [API](https://redux-form.com/7.2.0/docs/api/)
* [FAQ](https://redux-form.com/7.2.0/docs/faq/)
* [Getting Started](https://redux-form.com/7.2.1/docs/GettingStarted.md/)
* [Examples](https://redux-form.com/7.2.1/examples/)
* [API](https://redux-form.com/7.2.1/docs/api/)
* [FAQ](https://redux-form.com/7.2.1/docs/faq/)
* [Release Notes](https://github.com/erikras/redux-form/releases)
* [Older Documentation](https://redux-form.com/7.2.0/docs/DocumentationVersions.md/)
* [Older Documentation](https://redux-form.com/7.2.1/docs/DocumentationVersions.md/)

## 🏖 Code Sandboxes 🏖

Expand Down
1 change: 1 addition & 0 deletions docs/DocumentationVersions.md
@@ -1,5 +1,6 @@
# Documentation Versions

* [7.2.1](https://redux-form.com/7.2.1/)
* [7.2.0](https://redux-form.com/7.2.0/)
* [7.1.2](https://redux-form.com/7.1.2/)
* [7.1.1](https://redux-form.com/7.1.1/)
Expand Down
8 changes: 4 additions & 4 deletions docs/Flow.md
Expand Up @@ -25,7 +25,7 @@ Inside your `.flowconfig`, ensure the entire folder is not ignored:
## Props Types

This will give you the types of the
[`props`](http://redux-form.com/7.2.0/docs/api/Props.md/) that will be injected
[`props`](http://redux-form.com/7.2.1/docs/api/Props.md/) that will be injected
into your decorated form component by the `reduxForm()` higher order component.

### `FormProps`
Expand All @@ -51,7 +51,7 @@ class MyForm extends React.Component {
### `FieldProps`

This will give you the shape of the props provided from
[`Field`](http://redux-form.com/7.2.0/docs/api/Field.md/) to your field
[`Field`](http://redux-form.com/7.2.1/docs/api/Field.md/) to your field
component.

```jsx
Expand All @@ -72,7 +72,7 @@ const renderField = ({ input, meta, ...rest } : FieldProps) =>
### `FieldsProps`

This will give you the shape of the props provided from
[`Fields`](http://redux-form.com/7.2.0/docs/api/Fields.md/) to your fields
[`Fields`](http://redux-form.com/7.2.1/docs/api/Fields.md/) to your fields
component.

```jsx
Expand All @@ -97,7 +97,7 @@ const renderField = (fields : FieldsProps) =>
### `FieldArrayProps`

This will give you the shape of the props provided from
[`FieldArray`](http://redux-form.com/7.2.0/docs/api/FieldArray.md/) to your
[`FieldArray`](http://redux-form.com/7.2.1/docs/api/FieldArray.md/) to your
field array component.

```jsx
Expand Down
14 changes: 7 additions & 7 deletions docs/GettingStarted.md
Expand Up @@ -27,7 +27,7 @@ It's important to understand their responsibilities:

The diagram below represents the simplified data flow. Note that in most cases
you don't need to worry about the
[action creators](http://redux-form.com/7.2.0/docs/api/ActionCreators.md/) for
[action creators](http://redux-form.com/7.2.1/docs/api/ActionCreators.md/) for
yourself, as they're already bound to dispatch for certain actions.

<div style="text-align: center;">
Expand Down Expand Up @@ -76,7 +76,7 @@ Now your store knows how to handle actions coming from the form components.

**NOTE:** The key used to pass the `redux-form` reducer should be named
**`form`**. If you need a custom key for some reason see
[`getFormState` config](http://redux-form.com/7.2.0/docs/api/ReduxForm.md/#-getformstate-function-optional-)
[`getFormState` config](http://redux-form.com/7.2.1/docs/api/ReduxForm.md/#-getformstate-function-optional-)
for more details.

### Step 2 of 4: Form component
Expand Down Expand Up @@ -134,7 +134,7 @@ maintain the input state under the hood.

**NOTE**: `<Field/>` component is much more powerful. Apart from basic input
types, it can take a class or a stateless component. When you're ready, go to
the [docs](http://redux-form.com/7.2.0/docs/api/Field.md/#usage) to find out
the [docs](http://redux-form.com/7.2.1/docs/api/Field.md/#usage) to find out
more.

Let's finish up our contact form:
Expand Down Expand Up @@ -196,12 +196,12 @@ class ContactPage extends React.Component {
```

You can now take it from here. We recommend to check out the
[examples](http://redux-form.com/7.2.0/examples/). The common next steps could
[examples](http://redux-form.com/7.2.1/examples/). The common next steps could
also be:

* setting the
[initial form values](http://redux-form.com/7.2.0/examples/initializeFromState/),
[initial form values](http://redux-form.com/7.2.1/examples/initializeFromState/),
* implementing the
[validation](http://redux-form.com/7.2.0/examples/syncValidation/),
[validation](http://redux-form.com/7.2.1/examples/syncValidation/),
* creating dynamic forms with
[arrays of fields](http://redux-form.com/7.2.0/examples/fieldArrays/).
[arrays of fields](http://redux-form.com/7.2.1/examples/fieldArrays/).
7 changes: 3 additions & 4 deletions docs/MigrationGuide.md
Expand Up @@ -315,8 +315,8 @@ const upper = value => value && value.toUpperCase()
```

See the
[Normalizing Example](https://redux-form.com/7.2.0/examples/normalizing/) and
[Value Lifecycle](https://redux-form.com/7.2.0/docs/ValueLifecycle.md/) for more
[Normalizing Example](https://redux-form.com/7.2.1/examples/normalizing/) and
[Value Lifecycle](https://redux-form.com/7.2.1/docs/ValueLifecycle.md/) for more
details.

## Listening to other actions
Expand Down Expand Up @@ -369,8 +369,7 @@ will need to be updated. It more or less changed as follows:

### react-hot-loader

If you are using react-hot-loader 1.X and see the error `Uncaught TypeError:
Cannot read property 'wrapped' of undefined` then you will need to upgrade
If you are using react-hot-loader 1.X and see the error `Uncaught TypeError: Cannot read property 'wrapped' of undefined` then you will need to upgrade
react-hot-loader to 3.X.

While react-hot-loader v3 is still in beta, the best documentation is available
Expand Down
9 changes: 3 additions & 6 deletions docs/api/Fields.md
Expand Up @@ -49,8 +49,7 @@ localized date format.
`format` is called with the field `value` and `name` as arguments and should
return the new formatted value to be displayed in the field input.

To respect React 15 input behavior there is `defaultFormat = value => value ==
null ? '' : value` internally used. To disable that you can pass `null` as
To respect React 15 input behavior there is `defaultFormat = value => value == null ? '' : value` internally used. To disable that you can pass `null` as
`format` prop.

#### `props : object` [optional]
Expand Down Expand Up @@ -152,9 +151,7 @@ component.
#### `values : any`

> The current values of the fields. If they are nested, the values will
> duplicate the structure. For example, if your `names` are `[ 'name.first',
> 'name.last', 'email' ]`, the `values` will be `{ name: { first: 'John', last:
> 'Smith' }, email: 'john@email.com' }`
> duplicate the structure. For example, if your `names` are `[ 'name.first', 'name.last', 'email' ]`, the `values` will be `{ name: { first: 'John', last: 'Smith' }, email: 'john@email.com' }`
#### `getRenderedComponent()`

Expand All @@ -167,7 +164,7 @@ component.
## Props

The props that `Fields` will pass to your component are
[the same `input` and `meta` structures that `Field` generates](https://redux-form.com/7.2.0/docs/api/Field.md/#props),
[the same `input` and `meta` structures that `Field` generates](https://redux-form.com/7.2.1/docs/api/Field.md/#props),
except that they are broken up into the structure of the fields you gave as
`names`.

Expand Down
4 changes: 2 additions & 2 deletions docs/api/Form.md
Expand Up @@ -11,10 +11,10 @@ It is only useful if you are:
component
* **AND EITHER:**
* initiating your submission via the
[`submit()` Instance API](http://redux-form.com/7.2.0/docs/api/ReduxForm.md/#-submit-promise-)
[`submit()` Instance API](http://redux-form.com/7.2.1/docs/api/ReduxForm.md/#-submit-promise-)
(i.e. calling it directly on a reference to your decorated form component)
* initiating your submission by
[dispatching the `submit(form)` action](http://redux-form.com/7.2.0/examples/remoteSubmit/)
[dispatching the `submit(form)` action](http://redux-form.com/7.2.1/examples/remoteSubmit/)

If you are passing in your `onSubmit` function as a config parameter or prop,
this component will do nothing for you.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/FormValueSelector.md
Expand Up @@ -22,7 +22,7 @@ import { formValueSelector } from 'redux-form' // ES6

> The name of the form you are connecting to. Must be the same as the `form`
> config value you gave to
> [`reduxForm()`](https://redux-form.com/7.2.0/docs/api/ReduxForm.md/).
> [`reduxForm()`](https://redux-form.com/7.2.1/docs/api/ReduxForm.md/).
### `getFormState : Function` [optional]

Expand Down Expand Up @@ -89,5 +89,5 @@ connect(state => selector(state, 'first', 'second'))(MyFormComponent)
## Example

See the
[Selecting Form Values](https://redux-form.com/7.2.0/examples/selectingFormValues/)
[Selecting Form Values](https://redux-form.com/7.2.1/examples/selectingFormValues/)
example.
2 changes: 1 addition & 1 deletion docs/api/FormValues.md
Expand Up @@ -20,7 +20,7 @@ import { formValues } from 'redux-form' // ES6
### name

The path to the field, exactly like the `name` parameter of
[`<Field/>`](https://redux-form.com/7.2.0/docs/api/Field.md/).
[`<Field/>`](https://redux-form.com/7.2.1/docs/api/Field.md/).

### options: {prop: name, ...}

Expand Down
8 changes: 3 additions & 5 deletions docs/api/Props.md
Expand Up @@ -5,7 +5,7 @@
> The `props` listed on this page are the `props` that `redux-form` generates to
> give to your decorated form component. The `props` that _you pass into your
> wrapped component_ are listed
> [here](https://redux-form.com/7.2.0/docs/api/ReduxForm.md/).
> [here](https://redux-form.com/7.2.1/docs/api/ReduxForm.md/).
> If you are a strict `PropTypes` completionist, `redux-form` exports all of
> these
Expand Down Expand Up @@ -154,13 +154,11 @@ class SimpleForm extends Component {
> with the contents of the form data.
> Optionally, you may also pass your `onSubmit` function to `handleSubmit` which
> will take the place of the `onSubmit` prop. For example: `<form
> onSubmit={handleSubmit(this.save.bind(this))}>`
> will take the place of the `onSubmit` prop. For example: `<form onSubmit={handleSubmit(this.save.bind(this))}>`
> If your `onSubmit` function returns a promise, the `submitting` property will
> be set to `true` until the promise has been resolved or rejected. If it is
> rejected with an object like `new SubmissionError({ field1: 'error', field2:
> 'error' })` then the submission errors will be added to each field (to the
> rejected with an object like `new SubmissionError({ field1: 'error', field2: 'error' })` then the submission errors will be added to each field (to the
> `error` prop) just like async validation errors are. If there is an error that
> is not specific to any field, but applicable to the entire form, you may pass
> that as if it were the error for a field called `_error`, and it will be given
Expand Down
21 changes: 8 additions & 13 deletions docs/api/ReduxForm.md
Expand Up @@ -39,19 +39,18 @@ at "design time" or passed in as props to your component at runtime.**
> async validation only being run before submission.
> See
> [Asynchronous Blur Validation Example](https://redux-form.com/7.2.0/examples/asyncValidation/)
> [Asynchronous Blur Validation Example](https://redux-form.com/7.2.1/examples/asyncValidation/)
> for more details.
#### `asyncValidate : (values:Object, dispatch:Function, props:Object, blurredField:String) => Promise<undefined, errors:Object>` [optional]

> a function that takes all the form values, the `dispatch` function, the
> `props` given to your component and the current blurred field, and returns a
> Promise that will resolve if the validation is passed, or will reject with an
> object of validation errors in the form `{ field1: <String>, field2: <String>
> }`.
> object of validation errors in the form `{ field1: <String>, field2: <String> }`.
> See
> [Asynchronous Blur Validation Example](https://redux-form.com/7.2.0/examples/asyncValidation/)
> [Asynchronous Blur Validation Example](https://redux-form.com/7.2.1/examples/asyncValidation/)
> for more details.
#### `destroyOnUnmount : boolean` [optional]
Expand Down Expand Up @@ -117,8 +116,7 @@ at "design time" or passed in as props to your component at runtime.**
> ##### `values : Object`
> The changed field values in the form of `{ field1: 'value1', field2: 'value2'
> }`.
> The changed field values in the form of `{ field1: 'value1', field2: 'value2' }`.
> ##### `dispatch : Function`
Expand All @@ -130,8 +128,7 @@ at "design time" or passed in as props to your component at runtime.**
> ##### `previousValues : Object`
> The previous field values in the form of `{ field1: 'value1', field2: 'value2'
> }`.
> The previous field values in the form of `{ field1: 'value1', field2: 'value2' }`.
#### `onSubmit : Function` [optional]

Expand Down Expand Up @@ -374,20 +371,18 @@ switch (trigger) {

> a synchronous validation function that takes the form values and props passed
> into your component. If validation passes, it should return `{}`. If
> validation fails, it should return the validation errors in the form `{
> field1: <String>, field2: <String> }`. Defaults to `(values, props) => ({})`.
> validation fails, it should return the validation errors in the form `{ field1: <String>, field2: <String> }`. Defaults to `(values, props) => ({})`.
> See
> [Synchronous Validation Example](https://redux-form.com/7.2.0/examples/syncValidation/)
> [Synchronous Validation Example](https://redux-form.com/7.2.1/examples/syncValidation/)
> for more details.
#### `warn : (values:Object, props:Object) => warnings:Object` [optional]

> a synchronous warning function that takes the form values and props passed
> into your component. Warnings work the same as validations, but do not mark a
> form as invalid. If the warning check passes, it should return `{}`. If the
> check fails, it should return the warnings in the form `{ field1: <String>,
> field2: <String> }`. Defaults to `(values, props) => ({})`.
> check fails, it should return the warnings in the form `{ field1: <String>, field2: <String> }`. Defaults to `(values, props) => ({})`.
## Instance API

Expand Down
2 changes: 1 addition & 1 deletion examples/asyncValidation/index.html
Expand Up @@ -4,7 +4,7 @@
<meta charSet="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>Redux Form - Async Blur Validation Example</title>
<link href="https://redux-form.com/7.2.0/bundle.css"
<link href="https://redux-form.com/7.2.1/bundle.css"
media="screen, projection"
rel="stylesheet" type="text/css"/>
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"
Expand Down
6 changes: 3 additions & 3 deletions examples/asyncValidation/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/asyncValidation/package.json
Expand Up @@ -19,7 +19,7 @@
"react-dom": "^16.0.0",
"react-redux": "^5.0.3",
"redux": "^3.6.0",
"redux-form": "^7.2.0",
"redux-form": "^7.2.1",
"redux-form-website-template": "0.0.90"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/asyncValidation/src/index.js
Expand Up @@ -41,12 +41,12 @@ let render = () => {
* This <App/> component only provides the site wrapper.
* Remove it on your dev server if you wish. It will not affect the functionality.
*/
version="7.2.0"
version="7.2.1"
path="/examples/asyncValidation"
breadcrumbs={generateExampleBreadcrumbs(
'asyncValidation',
'Async Validation Example',
'7.2.0'
'7.2.1'
)}
>
<Markdown content={readme} />
Expand Down
2 changes: 1 addition & 1 deletion examples/fieldArrays/index.html
Expand Up @@ -4,7 +4,7 @@
<meta charSet="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>Redux Form - Field Arrays Example</title>
<link href="https://redux-form.com/7.2.0/bundle.css"
<link href="https://redux-form.com/7.2.1/bundle.css"
media="screen, projection"
rel="stylesheet" type="text/css"/>
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"
Expand Down
6 changes: 3 additions & 3 deletions examples/fieldArrays/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/fieldArrays/package.json
Expand Up @@ -19,7 +19,7 @@
"react-dom": "^16.0.0",
"react-redux": "^5.0.3",
"redux": "^3.6.0",
"redux-form": "^7.2.0",
"redux-form": "^7.2.1",
"redux-form-website-template": "0.0.90"
},
"devDependencies": {
Expand Down

0 comments on commit 4d8f41b

Please sign in to comment.