How to propagate a click event of a custom button on a custom control to outside of Jsonform

thanks for your great product! l have a question: l create a custom button on a custom control ,and l want to propagate the “onclick” event of the “custom button” to its parent or outside of Jsonform(eg:the class which <JsonForms …/> in),how can do it, thanks!

l know there is a “handleChange” function which can propagate to its parent,but the params can only set the path and value , l want custom other function to propagate some event(may take some custom data) to its parent, thanks!

Hi @davidxwwang,

The easiest way to do this is via React contexts. Just set one up outside of JSON Forms, consume it within your custom renderer and then you can hand in whatever you’d like.

1 Like

thanks ,best wishes! :grinning: