I am learning vuejs (3).
I have this loop:
<tr v-for="index in 7" :key="index">
<td>
{{ index }} {{ getDayOfTheWeek ? getDayOfTheWeek(index) : null }}
</td>
<td>
<input type="time" class="form-control" id="time_slot1_start" v-model="getTimeSlot1Start(index)" />
</td>
And the function getTimeSlot1Start is declared like that:
methods: {
getTimeSlot1Start (day) {
return this.openingHours.find(i => i.day === day).time_slot1_start
},
When I want to save my file, eslint tells me:
error 'v-model' directives require the attribute value which is valid as LHS vue/valid-v-model
Why do I get message? Is it not possible to bind a model with a function?