I have a loop that creates a dropdown menu from an array:
<select class="form-control" v-model="compare_version" >
<option
v-for="(version, index) in allVersions"
v-bind:value="index"
v-bind:key="version.versionid"
:selected="version.versionid === 0"
>{{ version.versionid }}</option>
</select>
My goal is to set the first value of the dropdown as the default.
The options are showing up but the first one is not being selected by default.
Can anyone spot the mistake in my code? Your help would be much appreciated!