Hi. I am having problems adding a clickable icon to a GridPro. I add the clickable icon as follows:
grid = new GridPro<>();
grid.setAllRowsVisible(true);
grid.setEditOnClick(true);
grid.addClassNames("editable-custom-effect");
grid.addThemeVariants(GridVariant.LUMO_NO_BORDER, GridVariant.LUMO_NO_ROW_BORDERS, GridVariant.LUMO_COMPACT);
grid.setDropMode(GridDropMode.BETWEEN);
grid.setRowsDraggable(true);
...
grid.addColumn(new ComponentRenderer<>(tripleValue -> {
Icon trash = VaadinIcon.TRASH.create();
trash.setColor("darkgray");
trash.setSize("20px");
trash.addClickListener(iconClickEvent -> {
question.removeOption(tripleValue);
dataProvider.refreshAll();
});
return trash;
})).setWidth("30px").setFlexGrow(0);
However when clicking the icon, the row is selected rather than the icon clicked!
Is this behaviour intentional or is this a bug? I have other columns that are inline editable on click, hence the grid.setEditOnClick(true),