-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
subscriptions can add dependencies to computed #341
Comments
I've included a fix for this bug in my deferred updates plugin: https://github.com/mbest/knockout-deferred-updates. Here are the two examples with the plugin included (but with deferred updates turned off): |
I see. This is a good justification for an internal instance of the I'll convert this into some specs and a pull request tomorrow. |
Great. The specs that I made are in branch 341-ignore-dependencies-from-callbacks. |
Excellent - thanks for the specs. Pull request added: #563 |
(Reopening until merged - didn't mean to close this!) |
Looks good. Merged. |
The
beforeChange
subscriptions are run within a computed's dependency block. Thus any observables that they access become subscriptions of the computed observable.Here is a fiddle to demonstrate: http://jsfiddle.net/mbest/RdFYC/
change
subscriptions can also cause subscriptions, but it's a little more complicated:http://jsfiddle.net/mbest/f7YtZ/
The text was updated successfully, but these errors were encountered: