mecjos
1 month ago
100
2
Vue

How to Bind multiple selectbox in Table rows

Posted 1 month ago by mecjos

Hi every one.. I have selectbox in table row. When I select and option in a raw, all select box are changing becasue it is binded to same data. How can I to this properly..

             <tbody>
                    <tr v-for="(job, index) in order.jobs">
                      <td>{{ index + 1 }}</td>
                      <td>{{ job.part.part_no}}</td>
                      <td><img class="avatar-sm" :src="pasteImage(job.part.image)"></td>
                      <td class="text-center">
                        <select v-model="selectedState"  class="form-control" style="width: 100%">
                          <option v-for="state in states" :value="state.id">{{ state.state_lang[0].name }}</option>
                        </select>
                      </td>
                    </tr>
                  </tbody>

Please sign in or create an account to participate in this conversation.