jsonform / jsonform

Build forms from JSON Schema. Easily template-able. Compatible with Bootstrap 3 out of the box.
https://jsonform.github.io/jsonform/playground/index.html
MIT License
2.73k stars 554 forks source link

onChange event - Form Initialization #376

Closed ghost closed 2 years ago

ghost commented 2 years ago

I am utilizing the onChange Event of a dropdown (text input with enums set). The onChange event fires correlty if I change the selected option of the the dropdown, but when the form is initialized and the selected dropdown value is set the onChange Event is not triggered. How can I make the event trigger also after initializing the form?

tchapi commented 2 years ago

Hi

This is expected since the onChange event is only triggered when a change of value happens in userland. You might want to add some custom js to do stuff when you init the JSONForm object

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.