I am using this example from the cookbook:
https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=treeView&demo=checkbox
The json that I am using follows the same structure and I have done the usual ajustements to make the example work on my viewmodel, but ultimately I am getting this error:
Message: row.data.selected is not a function
Similar examples work without problem but the checkbox one that i need doesn't.
That call to data.selected() seems to be the problem in both the html and js code.
I am using OJET 8.1.0.
Full error from Chrome:
VM24035:3 Uncaught (in promise) TypeError: Unable to process binding "attr: function () {
var evaluatedExprs = {};
var attrs = Object.keys(attrEvaluators);
for (var i = 0; i < attrs.length; i++) {
var attr = attrs[i];
evaluatedExprs[attr] = attrEvaluators[attr]();
}
return evaluatedExprs;
}"
Message: row.data.selected is not a function
at eval (eval at _createReplacementEvaluatorForExtend (ojkoshared.js:384), <anonymous>:3:57)
at ojknockout.js:2734
at update (knockout-3.5.0.debug.js:4407)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout-3.5.0.debug.js:3728)
at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout-3.5.0.debug.js:2331)
at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout-3.5.0.debug.js:2288)
at Function.evaluateImmediate (knockout-3.5.0.debug.js:2253)
at Object.ko.computed.ko.dependentObservable (knockout-3.5.0.debug.js:2085)
at knockout-3.5.0.debug.js:3726
at Object.arrayForEach (knockout-3.5.0.debug.js:168)
Thanks in advance