You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is most likely the fact that the on-click handler is lost when we copy the light DOM HTML content into the actual final render tree.
As a workaround, add the paper-icon-button using a JavaScript renderer:
<script>// TODO get the correct grid referencedataGrid.columns[1].renderer=function(cell){// Clear any previous elements (you could also re-use the previous paper-icon-button)cell.element.innerHTML="";// Create the paper-icon-buttonvarbutton=document.createElement("paper-icon-button");button.setAttribute("icon","delete");// TODO add the correct reference to the click handlerbutton.addEventListener("click",handleTableClick);// Add it to the cellcell.element.appendChild(button);// Access the row index// NOTE: see issue #21 (https://github.com/vaadin/components/issues/21)cell.row.index;}</script>
The text was updated successfully, but these errors were encountered:
v-grid styles hide the actual table-element that's produced by Polymer (inside the ). All the cells inside the visible grid are created&rendered by the Grid itself and the light dom data cells are parsed only for the contained data, ignoring any attributes.
From: https://vaadin.com/forum#!/thread/10447255
The problem is most likely the fact that the on-click handler is lost when we copy the light DOM HTML content into the actual final render tree.
As a workaround, add the
paper-icon-button
using a JavaScript renderer:The text was updated successfully, but these errors were encountered: