[Vuejs]-Populate Dynamic Input Box with existing Data VueJs

0๐Ÿ‘

โœ…

So I manage to solve it. By adding v-model.

v-model="travellerDetails['traveller_' + i][details]"

div class="col-md-10" id="app">
   <div class="form-row" v-for="i in travellers"> 
      <div class="form-group col-md-6" v-for="(details, index) in bookingRequiredDetails">
         <label for="required-details">{{ details }}</label>
          <input 
             type="text" 
             class="form-control"
             v-model="travellerDetails['traveller_' + i][details]"
             @input="prop('traveller_' + i, details, $event)"
             placeholder="Required Details" 
           />
     </div>
   </div>
</div>

Leave a comment