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

Default Schema Values don't trigger Rules on Init #63

Open
d4hines opened this issue Sep 24, 2018 · 0 comments
Open

Default Schema Values don't trigger Rules on Init #63

d4hines opened this issue Sep 24, 2018 · 0 comments

Comments

@d4hines
Copy link

d4hines commented Sep 24, 2018

Hello,
I'm very excited to use this library - it's really going to help me get a handle on form state.

I did notice that when I pass in a default value through the schema itself, the rules don't take those values into account (perhaps they fire before the defaults are initialized?).

I've provided a minimal example on StackBlitz: https://stackblitz.com/edit/react-jsonschema-form-conditionals-inital-state

I noticed passing in initial state into formData results in the intended behavior, so that's what I'll do (which, in the broader scope of an application, probably makes more sense anyway), but I thought the current behavior may be a bug.

Many thanks!

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

No branches or pull requests

1 participant