HI There.
I am working on implementing a grid in our new React project.
When the grid is populating a specific column and it is being rendered we are using “cellsrenderer” to call a TypeScript function and then based on the value of the cell in the column we change the returned HTML to show one thing or another.
That works fine.
However, I have into an issue where I want to render a button that will call another function when clicked, like this :
return(
<div><button onClick={this.displayPopover}>{value}</button></div>
)
Except…..this throws the following error:
TypeError: u.indexOf is not a function
_rendercell
D:/CurrentDevelopment/ColFaceReactUI/trunk/node_modules/jqwidgets-scripts/jqwidgets/jqxgrid.js:9889
There are a lot more data displayed with multiple errors for errors in different parts of jqxCore etc.
So if I wrap the <div> line above in quotes, it works fine, on and deal with the “value” so its concatenated to the returned string, but then the onClick event doesnt fire. So I added the following to just under the “super(props)” because I saw something like this in another forum post:
this.displayPopover = this.displayPopover.bind(this);
Unfortunately this didnt work either.
I am clearly doing something wrong but I am not sure what to do to resolve it. Can you please provide some assistance.
Thanks, Jeremy