eclipsesource / jsonforms-vuetify-renderers

https://jsonforms-vuetify-renderers.netlify.app/
Other
27 stars 26 forks source link

provide button renderer #80

Open kchobantonov opened 2 years ago

kchobantonov commented 2 years ago

Provide button renders that can execute javascript or a named action.

Useful when we want to position the button inside the jsonforms or when using the proposed new webcomponent

sdirix commented 2 years ago

I would consider this a perfect use case for a custom renderer as the user needs to bind some functionality against the button which we otherwise have to generically support in some fashion.

kchobantonov commented 2 years ago

it is possible to provide that in general way here is an example if you are interested https://github.com/kchobantonov/camunda-jsonforms-plugin/blob/master/plugin-ui/packages/common/src/renderers/ButtonRenderer.vue - it has a little bit more that what is needed but primary look for the injected actions.

This is useful not only when you have webcomponent and interaction with the form is limited - e.g. if you want to change the form language not only to listen for errors and data changes but also in the case when you integrate the forms with the Vue since the button can be rendered in any place in the forms.

The button is just a named action that you call with some context that's all nothing special really.