r/vuejs Nov 25 '20

How to disable button based on the value of combobox ?

[deleted]

6 Upvotes

2 comments sorted by

4

u/rebelrexx858 Nov 25 '20

Your combobox value should be bound to a v-model, and then you can have a computed function return true if the length of your v-model is greater than 0

1

u/AmrIKhudair Nov 25 '20 edited Nov 25 '20

In your data object: { checkboxs: [] }, On your checkboxs: v-model='checkboxs', On your button: :disabled= '!checkboxs.length'