koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
546 stars 155 forks source link

Just a curious question #266

Closed Mashiane closed 1 month ago

Mashiane commented 3 years ago

Is it possible to use this library to "hook" to existing element (those that were not created using the lib), and then change them depending on your options.

<v-btn id="xxx">Me</v-btn>

For example, assuming that a already existing on your page, then by some miracle

You want to "hook" vjsf to that, e.g. xy = vjsf.get("xxx") then you run a method on some returned vjsf object and change an attribute/style at runtime at run-time?

Does what im saying make sense perhaps / understandable?

albanm commented 3 years ago

I don't think I entirely understand the question, but maybe this can be of help:

The closest thing would probably be to include a custom component using a slot https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/examples#slots-wrappers

This custom component is integrated as a slot, but it is also possible to make it run some code that interacts with other parts of the page.