SteveSanderson/knockout — Issue #319: Custom binding update does not fire on foreach:{data:x}
Author: Myztiq
Created: 2012-02-09 18:56:28+00:00
State: open

When I utilize the foreach:myData and a binding the update functionality gets called. When I use foreach{data:myData} and a binding the update functionality does not get called on my binding.

Sadly, JSFiddle is currently disabled for editing so I cant push up a perfect example.
Take a look at this fiddle: http://jsfiddle.net/rniemeyer/MfegM/
Now, Modify :
data-bind="foreach: $root.items, accordion: {}"
to be:
data-bind="foreach: { data: $root.items }, accordion: {}"

Notice that when adding a new item it does not re-display itself as an accordion like it used to. This is because the update function on accordion is not getting called.

I am relatively new to knockout and I hope its just me doing something wrong, let me know.