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

Strange behavior when using v-model on the root element of a custom Component having itself a v-model #1643

Closed
ByScripts opened this issue Jul 19, 2020 · 2 comments
Labels
🐞 bug Something isn't working scope: v-model

Comments

@ByScripts
Copy link

Version

3.0.0-rc.1

Reproduction link

https://codesandbox.io/s/gracious-bhaskara-l6qhw

Steps to reproduce

Good:

Enter "1" in the first (wrapped) field. The field stay at "1" and the displayed value is "100"

Bad:

Enter "1" in the second (unwrapped) field. The field now shows "0.01" and the displayed value is "1"

What is expected?

Both field should stay at "1" and both values should be displayed at "100"

What is actually happening?

Second field is set to 0.01 and the displayed value is 1

@yyx990803 yyx990803 added 🐞 bug Something isn't working scope: v-model labels Jul 19, 2020
@CyberAP
Copy link
Contributor

CyberAP commented Jul 19, 2020

Possibly related to recent model event listeners fallthrough fix: 903e8f6

Right now you can fix that by adding emits: ['update:modelValue'] to both of your components.

@ByScripts
Copy link
Author

Thank for the workaround.

emits: ['update:modelValue'] makes the component working as expected :)

@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: v-model
Projects
None yet
Development

No branches or pull requests

3 participants