Within the v-for
loop, I am creating dynamic text fields. My dilemma now is how to retrieve the values of these inputs, as they are not a fixed number input so that I can assign their variables in the data()
.
This is how I am rendering the inputs:
<ion-list>
<ion-item v-for="(worker, index) in this.workers" :key="index">
<ion-label text-wrap>
{{ worker.name }}
</ion-label>
<ion-textarea placeholder="Enter Detail..."></ion-textarea>
</ion-item>
</ion-list>
<section style="margin: 20px 30px;--color: #272727;"></section>
<section>
<ion-button
shape="round"
expand="full"
@click="submit"
style="--background: #272727;text-transform: capitalize;font-size: 16px;color: #ffc946;"
>Submit</ion-button>
<!-- Save -->
</section>
Within the submit()
method, my goal is to retrieve values from all these textareas.