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

Fixes #137: Prevent non-required fields to fill state with defaults. #139

Merged
merged 1 commit into from
Apr 15, 2016

Conversation

n1k0
Copy link
Collaborator

@n1k0 n1k0 commented Apr 13, 2016

Refs #137, /cc @alexmnguyen.

We should carefully review this one at is has possible strong impact on forms behavior, though couldn't spot any problem in tests and in the playground.

r=? @leplatrem @magopian

@n1k0 n1k0 force-pushed the 137-fix-non-required-number branch 2 times, most recently from 43225bd to a4a5fad Compare April 13, 2016 13:26
@n1k0
Copy link
Collaborator Author

n1k0 commented Apr 13, 2016

I'm gonna move the default value for datetime into the widget itself.

Edit: It was already defined in the parseDateString helper. Dropped the whole defaultTypeValue stuff.

@n1k0
Copy link
Collaborator Author

n1k0 commented Apr 13, 2016

Deployed the changes to gh-pages http://mozilla-services.github.io/react-jsonschema-form/

@n1k0 n1k0 force-pushed the 137-fix-non-required-number branch from a1c2287 to ca00c08 Compare April 13, 2016 20:45
@leplatrem
Copy link
Contributor

it's a pity that we're obliged to repeat the sandbox.stub(console, "error", (error) in every test suite.

r+ otherwise :)

(as long as the default datetime is still «now»)

r=@leplatrem

- Dropped obsolete defaultTypeValue helper.
- Avoid having uncontrolled widgets components.
- Ensure no React warning can pass through the test suites.
@n1k0 n1k0 force-pushed the 137-fix-non-required-number branch from ca00c08 to 7847a73 Compare April 14, 2016 19:58
@n1k0
Copy link
Collaborator Author

n1k0 commented Apr 14, 2016

it's a pity that we're obliged to repeat the sandbox.stub(console, "error", (error) in every test suite.

Factored this.

I'm gonna land the patch after #132 is landed, as it probably conflicts heavily.

@n1k0
Copy link
Collaborator Author

n1k0 commented Apr 15, 2016

I need to land this now and make a release as this fixes a bunch of issues we need on other projects.

@n1k0 n1k0 merged commit d3e1078 into master Apr 15, 2016
@n1k0 n1k0 deleted the 137-fix-non-required-number branch April 15, 2016 13:06
rhgb added a commit to rhgb/react-jsonschema-form that referenced this pull request Apr 18, 2016
@rhgb rhgb mentioned this pull request Apr 18, 2016
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.

2 participants