I am trying something like this:
This is my datatable
Batch0 = [ // common columns
{ id: "_index", header: "", width: 45, template: function () { return arguments[4] + 1 } },
{ id: 'fsName', editor: 'text', header: ["Fs Name",{content:'textFilter',compare:reComp}], tooltip: false, width: 180, cssFormat: bgColorFuseDiff, template: fmtDiffObj },
];
and this is my reComp method
function reComp(value, filter) {
console.log(value); //coming as undefined
console.log(filter);
try {
return RegExp(filter, "i").test(value);
}
catch(e) {
return false;
}
}
and in reComp, the value is always coming as undefined. filter is printing what text I input into the filter in the datable header.
Please help me on why value is coming as undefined.