The Wayback Machine - https://web.archive.org/web/20220718112358/https://github.com/vuejs/vue/issues/12676
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested objects calling toRefs should not all return Ref objects #12676

Open
qqhtt opened this issue Jul 18, 2022 · 0 comments
Open

Nested objects calling toRefs should not all return Ref objects #12676

qqhtt opened this issue Jul 18, 2022 · 0 comments

Comments

@qqhtt
Copy link

@qqhtt qqhtt commented Jul 18, 2022

Version

2.7.7

Reproduction link

codesandbox.io

Steps to reproduce

steps one

Define a props component that receives an array type

steps two

Call it in the parent component and use the v-model to bind an object returned by the toRefs method

steps three

The child component props validation returns an error

steps four

In this case, v-model= value of ref object can be used normally

What is expected?

The toRefs method is expected to return a Ref object or a Reactive object based on the data type in the reactive object

What is actually happening?

The toRefs method returns only Ref objects, which requires a ref.value object to be used when calling child components in the template


Using Ref objects in templates should not require a.value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant