button does not work in a vaading-grid
fwermus opened this issue · comments
Fernando commented
I am trying to add a button in each row inside a grid, but I could not get onclick working. Any help would be appreciated
function Messages({ newMessage }) {
function edit(e){
alert("testing with no luck");
}
...
return html`
<vaadin-grid id="grid" theme="row-stripes">
<vaadin-grid-column header="Edit">
<template>
<vaadin-button theme="primary" @click="${e=>edit(e)}" >testing</vaadin-button>
</template>
</vaadin-grid-column>
</vaadin-grid>
`
}
I also tried declaring function outside function messages and several tries