Answer the question
In order to leave comments, you need to log in
How to remove adjacent element?
I want to delete or clear the inputs in the current cell when clicking on button.checkbox.
<tr v-for="row in data2" class="row body">
<td>
<button class="checkbox">x</button>
<input type="text" v-model="row.wednesday_from">
<input type="text" v-model="row.wednesday_to">
</td>
</tr>
$(this).parent('td').children('input').val("");
Answer the question
In order to leave comments, you need to log in
Use the tag
ref:
<tr v-for="row in data2" class="row body">
<td>
<button
ref="myButton"
class="checkbox"
@click="clrRow">x</button>
<input type="text" v-model="row.wednesday_from">
<input type="text" v-model="row.wednesday_to">
</td>
</tr>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question