I have list of inputs and labels that are generated with a v-for
. when i flight tested this with ONE item, it worked. when i expanded it for dynamicism, it broke all to !@#$. please point out my error.
here's my HTML:
<div v-for="(dRow, dIndex) in modalRows">
<section v-if="!dRow.isComplete">
<label :for="('proof' + dIndex)"><b>PROOF</b> (pdf, jpg, png):
<input type="file" :id="('proof' + dIndex)" ref="file"
@change="handleFileUpload(this.('proof' + dIndex))" />
</label>
<i class="las la-upload uploader"
@click.prevent="uploadProof(('proof' + dIndex).file, dRow)"></i>
</section>
</div>
and here's my Vue methods: (literally just checking if anything made it through)
handleFileUpload(file){ console.log(file); }
uploadProof(file,dRow){ console.log(file); console.log(dRow); }
it used to output the files
array when i had only one item manually id'd and labelled. now that i've altered it to allow for array-driven lists of inputs, it just reports:
invalid expression: missing name after . operator in handleFileUpload(this.('proof' + dIndex))
i'm at a loss. where's my mistake and what the !@#$ does that error mean???