I create a .tsx component and a function that is returning dynamic HTML.
getCellValues(_data) {
var ret=`<div onClick="`+this.selectDate("1")+`">1</div>`;
console.log(ret)
return ret; }
and this select data function looks like
selectDate(_data: string) {
console.log("*****selectDate**************************");
console.log(_data); }
and in component constructor added this line of code.
this.selectDate = this.selectDate.bind(this);
but after loading component this div onclick event shows undefined... ANd the rendered html looks like..
<div onclick="undefined">1</div>
Any ideas?