Set default selection option with props

Viewed 475

I'm having some trouble setting a default value I have tried the following: add selected in an option

<option value="1" selected>option A</option>

This did not work, below is an example of my code

<template>
  <div>
    <div>

      <div class="sm:col-span-3">
        <label
          for="outside_state"
          class="block text-sm font-medium text-gray-700 dark:text-white"
        >
          Option List
        </label>
        <div class="mt-1">
          <select
          v-model="selector.options"
            id="outside_state"
            name="outside_state"
            class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md dark:text-gray-900"
          >
            <option value="1">Value A</option>
            <option value="1">Value B</option>
          </select>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['selector'],
};
</script>

How could I set Value A as a default value?
Now when the page loads nothing is selected.

1 Answers
Related