#112563

The problem seems to be more complex.

I’ setted the template as shown below and the button is allways shown but clicking the button sometimes it works and sometime it doesn’t.

To be more clear sometime I see “Piu” and the new page opens; sometime I see “Passo di qui” and  “Passo di qua” on the console.

Why ?

tks
{label : ‘Quantity’, dataField : ‘XXX_Q’, showIcon: true, align: ‘center’, icon: ‘fa-plus-circle’, cellsAlign: ‘center’, width: 120,
template: function(formatObject) {
if (!formatObject.template) {
console.log(“Passo di qui”);
const plus = document.createElement(‘smart-button’);
plus.innerHTML = ‘<span class=”fa fa-plus cfg-button-font-icon”></span>’;
plus.addEventListener(‘click’, () => {
console.log(“Più”);
window.open(“https://www.w3schools.com&#8221;);
});
const template = document.createElement(‘div’);
template.appendChild(plus);
formatObject.template = template;
}
else {
console.log(“Passo di qua”);
}
}
},