react-jsonschema-form-conditionals icon indicating copy to clipboard operation
react-jsonschema-form-conditionals copied to clipboard

Default Schema Values don't trigger Rules on Init

Open d4hines opened this issue 6 years ago • 0 comments

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!

d4hines avatar Sep 24 '18 21:09 d4hines