The following is a computed observable, and i an calling its write function, but the write doesnt update the value for the computed.
self.pagesToBeDisplayed = ko.computed({
read: function () {
return self.pages();
}, write: function (totalCount) {
self.pages(totalCount)
},
deferEvaluation: true
});
I am calling the above observable as
self.pagesToBeDisplayed(5). However, only the value for self.pages is updated and
self.pagesToBeDisplayed is still the older value.
It's working as expected:
It's probably some other part of your code that is causing the problem.