Skip to content

Conversation

@acamposruiz
Copy link
Contributor

Add full data argument for onFieldsChange and onValuesChange

- onFieldsChange(props, changeFields) {
+ onFieldsChange(props, changeFields, allFields) {
},
- onValuesChange(props, changeValues) {
+ onValuesChange(props, changeValues, allValues) {
},

Fix of #94 . Now when you use onFieldsChange() or onValuesChange() you have access to all the inputs of the form with values on it, not only the changed input. You can get it by access to the third parameter on each function.

This new feature can be checked by access http://localhost:8000/examples/nested-field.html if before you have run npm start:

image

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 92.683% when pulling c40bbe6 on acamposruiz:issues/94-add-full-data-argument-onFieldsChange-and-onValuesChange into 7afffee on react-component:master.

@fiture
Copy link

fiture commented Oct 26, 2017

Is this PR can be merge to the master branch? Get all fields value on fields change callback is necessary
@benjycui

@acamposruiz
Copy link
Contributor Author

I think so :)

@benjycui benjycui merged commit 1821812 into react-component:master Nov 1, 2017
@benjycui
Copy link
Member

benjycui commented Nov 1, 2017

0a9aa38

Need more time to clean API and code, so it is not going to be published recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants