Reputation: 5606
Is there any reason why these 2 v-model bindings below would behave differently?
// component that uses FormExample
<script setup>
const fullName = someObject.fullName
</script>
<template>
// this works
<InputText v-model="fullName"/>
// this does not work
<InputText v-model="someObject.fullName"/>
</template>
Upvotes: 0
Views: 68
Reputation: 5606
Found a solution.
Issue is that the setup function doesn't unwrap refs recursively.
Therefore, you need to do it yourself.
<InputText v-model="someObject.fullName.value"/>
Upvotes: 0