Posted 3 April 2019, 4:50 pm EST
I have a column of buttons that I want to trigger an event onclick. I am using and the button is displaying. However, in the formatshoeID() method I put onclick=“test()” and it’s not triggering test.
Seems like it should be simple enough. Can I use onclick? Can I use vueJS @click?
Here is the formatShoeId() and test():
methods: {
formatShoeID: function (s, e) {
var flex = s;
if (e.panel == flex.cells && flex.columns[e.col].binding == 'ShoeId') {
e.cell.innerHTML = wijmo.format(
'<a href="#">{ShoeId}</a>',
flex.rows[e.row].dataItem);
} else if (e.panel == flex.cells && flex.columns[e.col].binding == 'create_listing') {
e.cell.innerHTML = wijmo.format(
'<button onclick="test()" class="testBtn">Create Listing</button>',
flex.rows[e.row].dataItem);
}
},
test: function() {
console.log('test is working');
}
}