Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use component props #101

Open
ngekoding opened this issue Oct 13, 2023 · 3 comments
Open

How to use component props #101

ngekoding opened this issue Oct 13, 2023 · 3 comments

Comments

@ngekoding
Copy link

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
Copy link
Contributor

yaffol commented Oct 25, 2023

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
Copy link
Contributor

yaffol commented Mar 8, 2024

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

@ngekoding
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants