Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

button does not work in a vaading-grid #233

Open
fwermus opened this issue Apr 22, 2021 · 0 comments
Open

button does not work in a vaading-grid #233

fwermus opened this issue Apr 22, 2021 · 0 comments

Comments

@fwermus
Copy link

fwermus commented Apr 22, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant