Answer the question
In order to leave comments, you need to log in
How to pass values from selected div to input?
I have a table
when clicking on TR (on the whole row), the first TD (first cell) should be transferred to the form below in the input, so that it is clear what the buyer has chosen, when clicked again, it should be deleted from the inputa
How to implement ?
Answer the question
In order to leave comments, you need to log in
If the table is generated by a loop through v-for, then add something like this:
And then add a handler method:
selectRow(item) {
if (item.first === this.myInput) {
this.myInput = ''
} else { this.myInput = item.first }
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question