I am looping an array to generate dropdown as below
<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>
I am trying to default the value of the dropdown to its first value.
The values are getting displayed but the first option is not getting selected .
What is the mistake in my code. Please help!!