I have the following view-model
var viewModel = {
FLFSExamIsH: ko.observable(true),
FLFSROIEntryFieldDynPosBottom: ko.computed(function() {
return this.FLFSExamIsH ? "flfs_ROIImagesRow3Pos" : "flfs_ROIImagesRow2Pos";
}),
};
in my html page I am binding a div as follows:
data-bind='css: FLFSROIEntryFieldDynPosBottom'
at some point in my code, I execute: viewModel.FLFSExamIsH(false);
But at all times (in the chrome debugger) viewModel.FLFSROIEntryFieldDynPosBottom() is always returning the 'flfs_ROIImagesRow2Pos', regardless of the update to the viewmodel: viewModel.FLFSExamIsH()
Setting a breakpoint on the computed function and updating that model variable doesn't re-evaluate the computed function either.