If/when SteveSanderson/knockout#458 becomes part of Knockout, this plugin will need to be modified to the cases where a computed observable is re-evaluated, but its value doesn't change (and thus it doesn't trigger a change event).
My idea is that the Deferred Updates plugin will watch for both dirty and change events for computed dependencies. The dirty event will add the computed to the queue, but only a change event will actually trigger re-evaluation (by setting _needsEvaluation = true).
If/when SteveSanderson/knockout#458 becomes part of Knockout, this plugin will need to be modified to the cases where a computed observable is re-evaluated, but its value doesn't change (and thus it doesn't trigger a
change
event).My idea is that the Deferred Updates plugin will watch for both
dirty
andchange
events for computed dependencies. Thedirty
event will add the computed to the queue, but only achange
event will actually trigger re-evaluation (by setting_needsEvaluation = true
).