Then in the angular component I have the function defined,
afterOnCellMouseDownCallBack(event, coords, TD) {
if(this==null) {
console.log("this value is null here afterOnCellMouseDownCallBack")
}
let checkBoxChecked = !event.target.checked;
}
Basically I have a checkbox at header level. And when I click the checkbox, things are not working as expected.
I am having two issues:
1- As shown above, in afterOnCellMouseDownCallBack , the value of this reference is null.
2-The statement let checkBoxChecked = !event.target.checked;
produces following error.
Uncaught TypeError: Cannot read property ‘checked’ of undefined
Yes actually ‘colHeaders’ is defined already but still it is not working. Even more I am concerned is that for all events triggered, the ‘this’ reference is always null. That is more problematic, because from any event triggered I cannot use reference to ‘this’. All my event handler functions are defined in the angular component, and all are getting called.
Also thanks for the link you provided. When I tried in that manner I am getting ‘this’ reference correctly, and mouse event is also fine . In that example they have used ‘settings’ for handsontable , but I am defining all my settings in hot-table for example