I have three tables on a page. Each table is in a separate bootstrap tab. Each table has an ACTION column with a button that is designed to trigger a JS script when it is clicked. This is all working well except I now have an issue were one of the tables is not using the renderer it should, it is using the render from another table.
Here’s a fiddle to show this should work http://jsfiddle.net/dgdavidson/6s2emwg8/3/
Only the linkBaseItemActionRenderer is being used in both second and third table.
Any thoughts on what could be causing this?
The renderers look like this
// set up a renderer to show the action button to link to a comparison item
Handsontable.renderers.registerRenderer('linkBaseItemActionRenderer', linkBaseItemActionRenderer);
function linkBaseItemActionRenderer(instance, td, row, col, prop, value, cellProperties) {
td.innerHTML = '<i class="fas fa-link link-tool text-center" onclick="baseNoMatchAction(' + row + ')" title="Link this to a comparison item"></i>BASE';
}
// set up a renderer to show the action button to link to a base item
Handsontable.renderers.registerRenderer('linkCompItemActionRenderer', linkCompItemActionRenderer);
function linkCompItemActionRenderer(instance, td, row, col, prop, value, cellProperties) {
td.innerHTML = '<i class="fas fa-link link-tool text-center" onclick="compNoMatchAction(' + row + ')" title="Link this to a base item">COMP</i>';
}
This is what the column definitions look like
renderer: "linkCompItemActionRenderer"
renderer: "linkBaseItemActionRenderer"