NuxtN
Nuxt15mo ago
65 replies
Viridian

USelect option values always turn into strings

I'm using a <USelect> with the following options:

const businessTypes = [{
  name: 'Particulier',
  value: 0,
}, {
  name: 'Zakelijk',
  value: 1,
}]

<UFormGroup label="Koop je particulier of zakelijk?" name="business" size="lg">
          <USelect v-model="form.business" :options="businessTypes" option-attribute="name" />
        </UFormGroup>


However, it seems that modelValue turns into a string "0" or "1" instead of numbers as I expect them to be. Is there a way to solve this?
Was this page helpful?