Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Wrapping can.compute in can.Map breaks live-binding #530
When a can.compute is wrapped in a can.Map and then live-bound, the view will not update when the compute changes.
See here for a very basic example: http://jsfiddle.net/simpleFabian/FLj7b
Is this behaviour intended in some way?
Thanks in advance!
So after talking with @justinbmeyer we came to the conclusion that this is intended...ish.
What you want to do, using your fiddle as an example, is:
This will get the compute on testMap, then you can call it with the value you want to change it to. This is where my previously stated "ish" comes into play. Currently if you do
This should still be in 2.0.2 which should be landing later today.
thanks for looking into this!
I'm not quite sure if that's the same thing you are into here, but that may totally be on me - is it?
I'm pretty sure we're on the same page. After this code I committed get's merged, your example will work in 2.0.2 just by changing
The issue with c2('after') not updating accordingly was fixed in 2.0.1 (Give http://jsfiddle.net/FLj7b/1/ a looksie, which uses 2.0.1).