Vaadin-grid: Programatically selecting/deselecting of hidden grid inconsistent

Created on 23 Mar 2016  路  6Comments  路  Source: vaadin/vaadin-grid

Using grid.selection.select or grid.selection.deselect on a grid that is not visible (i.e. child of a iron-pages element) shows inconsistent behavior. Only the first row is select/deselected. All other rows won't change the selection state. It works fine, if the iron-page that contains the grid is visible.

bug

Most helpful comment

@robertop87 grid.selectedItems = []; should do it.

All 6 comments

Here's a simple app reproducing the issue: http://plnkr.co/edit/BlhuI4XE5Etdc8vnETcr?p=preview

As a slight workaround, grid.refreshItems() or grid._grid.updateSize() can be called manually after grid is visible to update the checkbox states.

Wontfix for 1.x. The upcoming 2.0 version should not have this issue. Please upgrade to that, and add a comment if it does.

Hi everyone,

is there a way to deselect All items?

@robertop87 grid.selectedItems = []; should do it.

Was this page helpful?
0 / 5 - 0 ratings