Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose form values to parent component #7

Merged
merged 4 commits into from Aug 12, 2017
Merged

expose form values to parent component #7

merged 4 commits into from Aug 12, 2017

Conversation

zackify
Copy link
Owner

@zackify zackify commented Aug 11, 2017

@audiolion thoughts? Should be good to go :)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 2ab8b45 on feature/values into af81e1b on master.

@@ -0,0 +1,43 @@
//Test things dealing with the initialValues prop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialValues => values

error ? <p className="error">{error}</p> : <input {...props} />;

test('Form passes values to onValues', () => {
const onValues = spy();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jest has its own spy, do you just prefer sinon's implementation?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooo i used it back before i used jest and didnt bother to look and see. maybe ill make a pr where i remove it soon. You're welcome to if you want as well.

README.md Outdated

**initialValues**
exposes the values on change, you must manage the form state by passing in values if using this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might say passing in state to the ``values`` prop if using this. to make it more obvious.

Copy link
Contributor

@audiolion audiolion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good overall

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 322c769 on feature/values into af81e1b on master.

@zackify zackify merged commit 81d6200 into master Aug 12, 2017
@zackify zackify deleted the feature/values branch August 12, 2017 17:20
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.

None yet

3 participants