Vaadin-grid: Frozen columns in grid with multiple selection

Created on 8 Jan 2020  路  2Comments  路  Source: vaadin/vaadin-grid

When a grid has multiple selection and the first column is frozen, the column with the checkboxes moves to the left when the grid is scrolled.

frozen

    Grid<String> grid = new Grid<>();
        grid.setSelectionMode(SelectionMode.MULTI);
        grid.addColumn(s->s).setWidth("400px").setHeader("First").setFrozen(true);
        grid.addColumn(s->s).setWidth("400px").setHeader("Second");
        grid.addColumn(s->s).setWidth("400px").setHeader("Third");
        grid.addColumn(s->s).setWidth("400px").setHeader("Fourth");
        grid.setItems("A","B","C");
High Minor bug flow

Most helpful comment

Hi, confirmed the issue. Before this gets fixed, you can use the following workaround:

grid.addAttachListener(e -> {
  grid.getElement().executeJs("this.querySelector('vaadin-grid-flow-selection-column').frozen = true");
});

All 2 comments

Any update when this will be assigned and worked on?

Hi, confirmed the issue. Before this gets fixed, you can use the following workaround:

grid.addAttachListener(e -> {
  grid.getElement().executeJs("this.querySelector('vaadin-grid-flow-selection-column').frozen = true");
});
Was this page helpful?
0 / 5 - 0 ratings