Is there a way to set a default value for myselect when a user visits the site for the first time? I want the first option to be selected initially, but allow the user to change their choice if they prefer another option. Can this be achieved using v-model?
Below is the HTML code:
<div class="form-group">
<label class="control-label" for="docType">Type of document</label>
<select class="form-control" id='docType' name="docType" v-model="docType"
:disabled="noDocChoose == true">
<option value="paragon">Document1</option>
<option value="complaint">Document2</option>
</select>
</div>
And here is the Vue JS code snippet:
data: () => ({
docType: ''
}),