You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you pass a class to useVModel it emits a data object rather than an instance of the original class. The original object's prototype data does not match the prototype data on the emitted object. This seems like a bug. If it's not possible to fix, maybe we need another composable, something like useClassVModel.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Describe the bug
When you pass a class to
useVModel
it emits a data object rather than an instance of the original class. The original object's prototype data does not match the prototype data on the emitted object. This seems like a bug. If it's not possible to fix, maybe we need another composable, something likeuseClassVModel
.See the repro.
Reproduction
https://stackblitz.com/edit/vitejs-vite-ah9zrf?file=src/Child.vue
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: