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

Computed properties don't seem to resubscribe when the model is updated #213

Open
stephenhand opened this issue Sep 26, 2013 · 5 comments
Open
Labels

Comments

@stephenhand
Copy link

I had an issue where certain parts of my view stopped reacting to model updates because the computed bindings they depended on didn't unsubscribe from old models and resubscribe to new ones when the model structure updated. in the same way other bindings did.

I resolved the issue by modifying the Binding.update function. I will provide my changes in a pull request in case they are useful.

@ento
Copy link

ento commented Feb 7, 2014

I believe I'm facing the same problem. Here's a fiddle: http://jsfiddle.net/ZRHdA/3/
(rivets.js is loaded from the HEAD of master at rawgithub.com)

@mikeric any chance this issue will be addressed in the near future?

@blikblum
Copy link
Contributor

blikblum commented Feb 7, 2016

I confirm the bug is still present. I updated the fiddle with the most recent build: http://jsfiddle.net/ZRHdA/4/

@jccazeaux
Copy link
Contributor

I think this bug would not appear if we replace computed properties by functions calling like i described in #571 😉

@jccazeaux
Copy link
Contributor

Here is a jsfiddle of what I have in mind http://jsfiddle.net/jccazeaux/b64cw9qy/
Code for this feature is on this branch

@Duder-onomy
Copy link
Collaborator

This is definitely an issue.

I spent some time debugging and was only ever able to reproduce when putting computed on the prototype. This makes me think it could be related to: #572

There are allot of weird github issues I can cite with no resolution around how rivets handles methods and properties on prototypes. Will subsequently update this post and cite them if I have a moment tomorrow.

@jccazeaux That call formatter is cool. Would definitely be useful feature.

The work that @stephenhand did some years back seems to be a big change for a small issue.

There is some interesting discussion here around such things: #417

I wonder what the implications of modifying this line in sightglass as https://github.com/mikeric/sightglass/blob/master/index.js#L128 as @jccazeaux has pointed out.

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

5 participants