<div v-if="result.length" style="clear:both">
<div v-bind:key="item.id" v-for="item in result">
<div class="ui form">
<div class="field">
<label>Content</label>
<textarea id="dynamic-textarea-{{item.id}}" cols="30" rows="10">{{item.content[0]}}</textarea>
</div>
<div class="field right aligned">
<button @click="updateData($event, item.id)" class="ui primary button">Update</button>
</div>
</div>
</div>
During the iteration above, I am trying to find a way to access the value of the 'current' textarea when the updateData
function is called. I considered assigning an id to the textarea input or using $ref
, but it didn't quite work as expected. Any assistance on this issue would be greatly appreciated. Thank you!