eclipsesource / jsonforms-vuetify-renderers

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

How to use component props #101

Open ngekoding opened 8 months ago

ngekoding commented 8 months ago

Hi, sorry for the basic question but I was try and search with no luck.

How to pass the component props, like we want to use filled to the input?

Thanks in advance.

yaffol commented 8 months ago

You need to pass in configuration options to the vuetify property of the config that you hand over to JSON Forms. For example

const config = {
      breakHorizontal: 'md',
      hideArraySummaryValidation: true,
      vuetify: {
        'v-text-field': 'filled',
        'v-combobox': 'filled',
        'v-autocomplete': 'filled',
        'v-textarea': 'filled',
        'v-select': 'filled',
        'v-expansion-panels': {
          flat: true,
          focusable: false,
        },
        'v-container': {
          fluid: true,
        },
      },
    }

There I'm setting all the form text input controls to take the 'filled' prop.

And hand that off to your json-forms component

`<json-forms
        :data="data"
        :schema="schema"
        :uischema=".uischema"
        :renderers="renderers"
        :i18n="i18n"
        :uischemas="uischemas"
        :config="config"
        @change="onChange"
      />`
yaffol commented 4 months ago

@ngekoding does this answer your question? If so we can probably close this, though docs PRs are always welcome!

ngekoding commented 3 months ago

Thank you for the answer and sorry for very late reply.

In the time I facing the problem and moved to another scenario, so I don't use this library yet again.

Maybe can try it in another project or just for make it sure.