Answer the question
In order to leave comments, you need to log in
How to remove the disabled button from the button when clicking on an object?
How can I make a button disabled by default, but when clicking on another object, the button becomes active?
If the user clicks on this object,
<tr v-for="product in products" @click="addToCart(product)" class="table-active">
<button :disabled>
Answer the question
In order to leave comments, you need to log in
Create a buttonDisabled property with a value of false, write in the template
and when you need to unblock the button, just write buttonDisabled=false, when the block is true. So add to the addToCart methodthis.buttonDisabled=false;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question