Within my VueJS application, there is a select option present in a form that looks like this:
<!-- Schedule type -->
<div class="container mx-auto flex bg-white px-6 py-1 space-x-2">
<dashboard-input-label class="col-sm-2 mb-2 w-full" identifier="schedule_type">
Schedule type
</dashboard-input-label>
<div class="col-sm-10 mb-6 w-full">
<validator-v2
:identifier="identifier"
:rules="rules.schedule_type"
>
<cs-dashboard-select
:options="[
{ value: '1', label: 'On duty'},
{ value: '2', label: 'On vacation'},
{ value: '3', label: 'Training'},
{ value: '4', label: 'Sick leave'},
]"
name="schedule_type"
v-model="selectedValue"
> Select type
</cs-dashboard-select>
</validator-v2>
</div>
</div>
<!-- Schedule type -->
My question is, how can I set the default selected value to be option 1, 'On duty'?
I attempted to achieve this by using:
{ value: '1', label: 'On duty', selected},
However, this approach did not work as expected....