Today I faced a similar problem and was able to solve it for my team, replacing the template with a user binding, which first clears all the ko data and frees the container before rendering.
http://jsfiddle.net/igmcdowell/b7XQL/6/
I used a contactless template like this:
<ul data-bind="alwaysRerenderForEach: { name: 'itemTmpl', foreach: items }"></ul>
and alwaysRerenderForEach user binding:
ko.bindingHandlers.alwaysRerenderForEach = { init: function(element, valueAccessor) { return ko.bindingHandlers.template.init(element, valueAccessor); }, update: function(element, valueAccessor, allBindings, viewModel, context) { valueAccessor().foreach();
Obviously, a little late as an answer to your request, but may help others who hit it from the search (like me).
source share