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

no change triggered after reassigned state #5191

Closed
ayou3 opened this issue Mar 14, 2017 · 7 comments
Closed

no change triggered after reassigned state #5191

ayou3 opened this issue Mar 14, 2017 · 7 comments
Labels

Comments

@ayou3
Copy link

@ayou3 ayou3 commented Mar 14, 2017

Vue.js version

2.2.4

Reproduction Link

https://jsfiddle.net/orzz/ucLrrnj4/8/

What is Expected?

state declare in root component should change and render to html
same code in vue version 2.0.0 worked as expected https://jsfiddle.net/orzz/k18o6e0f/1/

What is actually happening?

state changed in the callback emitted by child component is not worked as expected

@Etheryte
Copy link

@Etheryte Etheryte commented Mar 14, 2017

It will be a lot easier for anyone to help you out if you simply share your code instead of images of your code. You can base your demo off of the Jsfiddle template included in the readme, if it's easier for you.

@posva
Copy link

@posva posva commented Mar 14, 2017

@ayou3
Copy link
Author

@ayou3 ayou3 commented Mar 14, 2017

@posva if i watch the var named 'varieties' it worked well

@yyx990803
Copy link

@yyx990803 yyx990803 commented Mar 14, 2017

FYI, just pasting the code does not satisfy the requirement for a reproduction. Please follow the Issue Reporting Guidelines and provide a minimal JSFiddle or JSBin containing a set of reproducible steps that can lead to the behavior you described.

Why is this required?

@LinusBorg
Copy link

@LinusBorg LinusBorg commented Mar 19, 2017

@yyx990803 The reproduction jsfiddle is now interactive and I'm stumped as to why it behaves the way it does. :/

Maybe it's my dizzy sunday head, btu this looks like a bug?!?

@javoski
Copy link

@javoski javoski commented Mar 19, 2017

The newly pushed watchers caused by state changes inside updated hooks haven't been called at all.
In core/observer/scheduler.js L83 to L86, the queue is cleared after all updated hooks have been called.

@ayou3
Copy link
Author

@ayou3 ayou3 commented Mar 21, 2017

Thanks all you guys

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

No branches or pull requests

6 participants