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

fix(runtime-core): assign value after children are render #1320

Closed
wants to merge 1 commit into from

Conversation

pikax
Copy link
Member

@pikax pikax commented Jun 8, 2020

fix #1318

Problem is caused when the select.value is set, but there's no children options, so the value cannot be set. After the first child is render the select will reset to it, but if you bind value to other value, it will ignore.

The implementation is in runtime-core but the test is on runtime-dom because is a bit trickier to test with test-utils

@yyx990803 yyx990803 closed this in 8084156 Jun 12, 2020
@yyx990803
Copy link
Member

We shouldn't have DOM-specific special cases in runtime-core. Actually, we just need to mount children before setting the props (which is Vue 2's behavior)

@pikax pikax deleted the fix/select_initial_value branch June 12, 2020 16:15
@pikax
Copy link
Member Author

pikax commented Jun 12, 2020

That's definitely much better 👍

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

Successfully merging this pull request may close these issues.

select value first render not work
2 participants