In my custom renderer I need to display one value but create HTML Href link to another value (id) so I need 2 values – so in my column definiton I use this
{data: ‘breadth’,width: 25,readOnly:true, dropdownMenu: false, editor: false,renderer: ‘idHistoryRenderer’},
Then my custom rendered can use value of breadth in the display HTML –
function idHistoryRenderer(instance, td, row, col, prop, value, cellProperties) {
Handsontable.renderers.BaseRenderer.apply(this, arguments);
td.innerHTML = "<a onclick=\"showHistory('"+value+"', 'id');\" href=\"#\">"+ value + "</a>";
// console.log(td.innerHTML);
return td;
}
But I need another value for actual object id – Q: How do I pass 2 values into custom renderer – or how do I pass the whole object into it as value?