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

Use readonly prop of v-form to disable the form #337

Open
Meplos opened this issue Feb 2, 2022 · 1 comment
Open

Use readonly prop of v-form to disable the form #337

Meplos opened this issue Feb 2, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Meplos
Copy link
Contributor

Meplos commented Feb 2, 2022

Hello, 🖖

I wan't to check role of my user to enable or not modification on my schema.
I setup readonly props of my v-form but not affect my vjsf child.

  <v-form
                ref="form"
                v-model="valid"
                autocomplete="off"
                :readonly="!$isGranted(role + 'UPDATE')"
            >

I also tried to put it in props of my vjsf but doesn't work. 😞

So does solution exist to allow user to update data in all schema or not ?

Thanks , have a good day 🌞

PS : I know we could had readonly props in properties object but I wan't to avoid that.

@albanm
Copy link
Member

albanm commented Feb 2, 2022

See here. You can either set readOnly=true at the top of your schema or use disableAll option.

I didn't know about the readonly prop on v-form, I will try to respect it at some point.

@albanm albanm added the enhancement New feature or request label Feb 2, 2022
@albanm albanm self-assigned this Feb 2, 2022
@albanm albanm changed the title Readonly in all schema Use readonly prop of v-form to disable the form Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants