brutusin / json-forms

JSON Schema to HTML form generator, supporting dynamic subschemas (on the fly resolution). Extensible and customizable library with zero dependencies. Bootstrap add-ons provided
http://brutusin.org/json-forms
Apache License 2.0
606 stars 168 forks source link

getData bugfix and onDependencyChanged feature #111

Open stutteringp0et opened 6 years ago

stutteringp0et commented 6 years ago

getData bombs out on an item list with empty elements. I added several tests for "s" before additional tests on properties of "s". This allows dependency changes to continue even on item lists with empty elements.

onDependencyChanged, I passed the source variable from the function input vars to the schema resolver. This allows the resolver to calculate which of an item list is making the modification.