Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Observe with deeply nested data

$
0
0
OK, thx -- seems it might be challenging to "remember" where each deep observable was referenced across multiple views. Ideally just the items that changed would re-render. Seems a partial that references only the deep observable could do that? 

I don't know how much simpler it can be, but the example below has trucks and transports as views (no cars). Still has trucks[].make=>makes, and transports[].vehicles[].make=>makes. The updateObservable() function should result in a live update of all deep observables in the views.

As an aside, it is very nice that transports[].vehicles.push() does a live update of an existing transport. That is, the addVehicle() code can call vehicles.push() without any special setter or helper. And this works even though can.Observe.List is only called on the top-most "transports" container!


Viewing all articles
Browse latest Browse all 3491

Trending Articles