eclipsesource / jsonforms-vue-seed

Vue 3 and Vue 2 seed for JSON Forms
https://jsonforms-vue-seed.netlify.app
Other
41 stars 22 forks source link

For the custom render component, how to send the changed data value to parent form #16

Closed zuo305 closed 1 year ago

zuo305 commented 1 year ago

Hi,

Thanks to the lib, I already made a custom render component(selector) and it is working well. Now I hope to trigger the form's onChange inside of the custom render component. How to do it?

I already found the "handleChange", but I am not sure how to use it.

Thanks. I am using Vue3.

zuo305 commented 1 year ago

Hi,

I got the answer from this link: https://github.com/eclipsesource/jsonforms/blob/master/packages/vue/vue/README.md

methods: { onChange(event: Event) { this.handleChange( this.control.path, (event.target as HTMLInputElement).value ); }, },

It is working well. thanks.