I am building models using Knockout. I have one parent model and couple of children. Each children has obsevrable
(computed
in working codem but it does not changes situation) isLoading
which return true
when any internal operation inside model processed.
Parent model has also computed isLoading
which has subscriber. In this subscriber I want execute some code only once (I have special flag, it is ok). My problem is that this code changes somehow isLoading
state of one child. And there I found that it does not raises parent computed changed.
How to bread this circular dependency?
Sample fiddle: http://jsfiddle.net/202x4755/
UPD: Key point is to use setTimeout