1234 Commits

Author SHA1 Message Date
Zhigang Fang
50d0887268 Add ability to use function in enableReinitialize v6.0.6 2016-09-22 19:53:56 +08:00
Tanner Netterville
f767056cd9 Adds a third argument when calling reducer plugins (#1822)
* Adds a third argument when calling reducer plugins

This argument is the state before the redux form and other plugins reduce the action to the state provided as the first argument.

* remove extra whitespace
2016-09-20 18:31:51 +02:00
Erik Rasmussen
d9f0282d1c Merge remote-tracking branch 'origin/master' 2016-09-20 17:01:00 +02:00
Erik Rasmussen
afc8ae8fe4 switched redux-form.com to https 2016-09-20 17:00:11 +02:00
Aaron Hardy
e9bcc1b54e Fixes #1785. Ensures component is updated if props length changes. (#1789) 2016-09-17 09:30:26 +02:00
Kevin Huang
0a71b2a9b3 Remove duplicate 5.2.3 docs link and upkeep of v6 patch docs links (#1793)
* Remove duplicate 5.2.3 link in documentationversions

* Add missing patch version documentation links & clean up markdown format
2016-09-17 09:27:00 +02:00
Benoit Bénézech
4babf1b976 fix checkox behavior (#1774)
* Improve dirty handling for check-boxes

`dirty(undefined, false)` should be `false`. It was `true`.

Intuitively, clicking twice on a check-box should return it to
pristine, which is false atm (unless the checkbox is initialized with
`false`).

Same behavior as empty and undefined for a string.

Also decreases code complexity. If both value and initial are falsey,
return “equal true”.

Comes with tests, both immutable and plain structures are covered.

I’d call it a safe merge and would be very pleased to see it shipped.
🐣

* fix checkbox behavior

Follow up to #1762
When a checkbox is initialized with undefined or is not initialized,
`false` should be treated as `undefined` and removed from the value
tree.
It follows the convention of text fields in redux-form (‘’ value is
removed when initial is `undefined`) and follows web form checkbox
original behavior (a checkbox is checked or ‘absent’).
Of course it won’t affect forms where checkboxes are initialized with
`false` (double-clicking them will bring back `false` instead of
`undefined`, on par with text fields in redux-form)
2016-09-15 15:36:59 +02:00
Erik Rasmussen
88383d02a1 merging? v6.0.5 2016-09-15 13:27:27 +02:00
Erik Rasmussen
866c5d1d95 Fixed double change dispatch (#1772)
* Fixed double change dispatch. #1771

* linting (again!)
2016-09-15 13:26:40 +02:00
Erik Rasmussen
4672e36b57 v6.0.5 2016-09-15 13:22:41 +02:00
Erik Rasmussen
fb1175867d v6.0.4 v6.0.4 2016-09-15 12:11:03 +02:00
Erik Rasmussen
c698c8df9f v6.0.3 v6.0.3 2016-09-15 11:38:23 +02:00
Stefan Mirea
cb3abb5b41 Implemented custom meta props. Fixes #1634 (#1684) 2016-09-15 10:36:14 +02:00
Kevin Huang
ac5506afdf Fix broken npm example script + add scripts & documentation for running each example locally (#1689)
* Add working npm example start scripts for every example

* Add instructions to run examples locally to all examples & top level md file

* Add missing backtick to local commands on each example file

* Rephrase running locally instructions for each example
2016-09-15 10:33:29 +02:00
Erik Rasmussen
c85393cb14 resolving conflicts...? 2016-09-15 10:26:26 +02:00
Erik Rasmussen
720a270be3 resolved conflicts 2016-09-15 10:23:09 +02:00
Erik Rasmussen
2e1a8c42f9 resolved conflicts 2016-09-15 10:17:50 +02:00
Vitaly Gorodetsky
706c43be93 fixes #1704 Uncaught (in promise) (#1722) 2016-09-15 10:14:09 +02:00
Asa Ayers
0896e3ecba Add meta.touched to FieldArrays (#1715)
* Fixes #1308 add meta.touched to FieldArrays

* Update FieldArrays example
2016-09-15 10:13:14 +02:00
Aren Blondahl
226736b6a3 Support for ImmutableJS setIn array paths (#1716)
* Support for ImmutableJS setIn array paths

* Added more comprehensive unit tests for immutable/setIn

* Fixed an edge case missed with the new setIn
2016-09-15 10:11:19 +02:00
François Guillot
09aa7eef76 With Immutablejs, reducer must come from 'redux-form/immutable' (#1717)
Just got bitten. Think it should be added to documentation.
2016-09-15 10:09:31 +02:00
François Guillot
0662a2558a Also updating the Immutablejs example (#1718) 2016-09-15 10:09:12 +02:00
huan086
89e183f639 Reuse connected ConnectedField, ConnectedFields and ConnectedFieldArray so (#1734)
as not to cause component to be recreated, losing its state. Fixes #1727
2016-09-15 10:08:52 +02:00
huan086
f920122e9d Rewrite recursive rest spread getInPath into simple for loop for 10x speed improvement. (#1741) 2016-09-15 10:08:32 +02:00
Benoit Bénézech
a4c1d9f038 Improve dirty handling for check-boxes (#1762)
`dirty(undefined, false)` should be `false`. It was `true`.

Intuitively, clicking twice on a check-box should return it to
pristine, which is false atm (unless the checkbox is initialized with
`false`).

Same behavior as empty and undefined for a string.

Also decreases code complexity. If both value and initial are falsey,
return “equal true”.

Comes with tests, both immutable and plain structures are covered.

I’d call it a safe merge and would be very pleased to see it shipped.
🐣
2016-09-15 10:06:30 +02:00
Erik Rasmussen
787de21919 Bound change and blur to dispatch (#1767)
* Bound change and blur to dispatch #1696

* linting
2016-09-15 10:05:19 +02:00
Chainarong Tangsurakit
7df252708c update es6-error version (#1760) 2016-09-15 09:37:10 +02:00
Esko Luontola
7d6aace1c7 Option to keep submit errors on change (#1735)
* Add clearErrorsOnChange config property to reduxForm() (#1708)

* Make clearErrorsOnChange also affect global errors (#1708)

* Fix clearing old global errors on stopSubmit (#1708)

* Global errors were always not cleared by stopSubmit
* Clearing field submit errors was not tested

* Rename (and invert) clearErrorsOnChange to persistentSubmitErrors (#1708)

* Fix submit not working when persistentSubmitErrors is enabled and there are old submit errors (#1708)

* Fix lint errors
2016-09-11 23:48:09 +02:00
Taylor Hakes
c90f6e6be0 changed setSubmitSucceeded to not touch submitting state 2016-09-03 19:12:35 -04:00
Erik Rasmussen
9186bd3b33 v6.0.2 v6.0.2 2016-09-02 09:41:28 +02:00
Stefan Mirea
d41e010b91 Improved performance of getIn (#1667)
Optimized for the most common use-case: path length of 1, 2 or 3 items

On my chrome it shows ~5x improvement

jsPerf is down, so here's a benchmarkJS fiddle:
https://jsfiddle.net/9vqm86eu/1/
2016-09-02 08:28:34 +02:00
Tiger Oakes
7e0c15e5b7 Replaced babel-preset-es2015 with babel-preset-es2015-no-commonjs (#1671) 2016-09-02 08:27:27 +02:00
Kevin Huang
9ab72b0fc1 Add missing documentation on enableReinitialize in InitializeFromState example docs (#1681)
* Add documentation about enableReinitialize to InitializeFromState.md example

* Rewrite initialize section to include 'keepDirtyOnReinitialize' & 'INITIALIZE'

* Make the reinitialization section more readable with an ordered list

* Fix typos in InitializeFromState.md
2016-09-02 08:26:22 +02:00
David Furlong
7cb660df70 Update index.js (#1676) 2016-09-01 19:35:49 +02:00
Andrew Bushmin
37d5c2800b fix submit form after failing (#1654) 2016-08-31 15:54:06 +02:00
Kevin Huang
fb03d0a702 Add Source code links to API documentation & Add selectors section to api/README.md (#1656)
* Add source code links on /api docs for each section block

* Remove trailing spaces on various lines on api/README.md

* Add source code link to api/ActionCreators.md

* Add source code link to api/Field.md

* Add source code link to api/FieldArray.md

* Add source code link to api/Fields.md

* Add source code link to api/FormValueSelector.md

* Add source code link to api/Props.md

* Add source code link to api/Reducer.md

* Add source code link to api/ReducerPlugin.md

* Add source code link to api/ReduxForm.md

* Add source code link to api/Selectors.md

* Add source code link to api/SubmissionError.md

* Add a section for Selectors in api/README.md to link to the new Selectors.md

* Separate source links for reducer & reducer.plugin on api/README.md

* Reformat source code link for reducer.plugin to be aligned with the rest of the block
2016-08-31 15:47:28 +02:00
Kevin Huang
4038836544 Add explanation on how custom props are given in Field & clarify props given by Field (#1663)
* Explain how custom props are given in Field alongside meta & input props in documentation

* Add line break between props explanations in Field.md
2016-08-31 15:32:48 +02:00
Julien Debon
247e596e06 #1635 Replacing duplicated username with password in V6 example (#1638) 2016-08-30 08:13:54 +02:00
Matías Olivera
e6c5d79482 Pass props to handleSubmit (#1639) 2016-08-30 08:13:16 +02:00
Kevin Huang
1c6ac42d01 Fix broken links & image in documentation (#1651)
* Fix broken link to proptypes.js in props documentation

* Fix broken link to reduxForm() api docs in the props api docs

* Fix image source url for life cycle page in the docs

* Redo fix for ValueLifecycle image source with better raw github url
2016-08-30 08:12:34 +02:00
Kevin Huang
3aec1273c9 Remove deprecated reducer.normalize details from Reducer.md (#1652) 2016-08-30 08:11:40 +02:00
Erik Rasmussen
d6973dd6d8 fixed links in examples nav 2016-08-26 12:22:38 +02:00
Erik Rasmussen
562df284bf fixed field array example readme 2016-08-26 12:10:25 +02:00
Erik Rasmussen
b7997ec274 fixed selectors docs. #1617 2016-08-26 10:46:26 +02:00
Erik Rasmussen
2f55d9edef linked to older docs on README. #1621 2016-08-25 17:11:24 +02:00
Erik Rasmussen
381e788932 fixed codecov badge 2016-08-25 17:10:23 +02:00
Erik Rasmussen
15c3dc6c69 fixed codecov integration, maybe? 2016-08-25 16:45:27 +02:00
Erik Rasmussen
d664dc3e3d changed version to 6.0.1 v6.0.1 2016-08-25 16:16:28 +02:00
Erik Rasmussen
7f03469016 v6.0.0 release! 2016-08-25 16:06:16 +02:00
Erik Rasmussen
3fac81bc50 Fixed broken RadioButtonGroup Material UI implementation. #1599 2016-08-25 14:24:11 +02:00