I have this for lop in my Vue JS application:
<b-form>
<table class="table">
<thead>
<tr>
<th>Import Field</th>
<th>Project Field</th>
<th>Select</th>
</tr>
</thead>
<tbody>
<tr
v-for="(data, index) in projectFieldOptions"
:key="index"
>
<td>
<b-form-input
class="basicInput"
v-model="data.text"
/>
</td>
<td>
<b-form-select
v-model="
selectedProjectOption
"
:options="
projectFieldOptions
"
/>
</td>
<td>
<b-form-checkbox
v-model="selectMap"
checked="false"
name="check-button"
switch
inline
>
</b-form-checkbox>
</td>
</tr>
</tbody>
</table>
<b-button
variant="primary"
type="submit"
@click.prevent="validateEditMapping"
>
Next
</b-button>
</b-form>
It's showing this output:
You can see there are 3 fields:
- Import Field ( as input box )
- Project Field ( as select dropdown )
- Select ( as checkbox )
Now,
- How can I get all the input, select and checkbox fields as array in Vue JS?
- If I change the Project field dropdown then other dropdowm is also changed but it's should change my selected dropdown only. How can I solve it?
I want the output should like this:
[
{ item, imte, 0 },
{ description, description, 1},
....
]
