I have a data array that I want to bind input element entry (integers) into data fields, and then total them. This is akin to a spreadsheet where it can compute the sum or difference of different values specified in the same column.
I don't understand from vue.js documentation, what it takes to make two-way data binding work on these array objects. I can't tell if the values are updating in the array. Either they aren't updating the array, or the summation link is not being updated. Do you have a recommendation for determining if the data binding is broken, or why the expression is not getting updated?
<tr v-for="(row, powerIndex) in powers">
<td :class="powerlabelclass(row)">{{ row.name }}</td>
<td class="power-item" v-for="turn in turns">
<div v-if="row.expression">
<input :class="poweritemclass(row)" type="number" :tabindex="tabindex(powerIndex, turn)" :value="calculatepower(powerIndex, turn)" />
</div>
<div v-else>
<input :class="poweritemclass(row)" type="number" :tabindex="tabindex(powerIndex, turn)" :value="row.turns[turn]" />
</div>
</td>
</tr>
Here is the js fiddle: https://jsfiddle.net/ledlogic/fst561by/