Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Dart Grid : setting the selected indices on a hidden grid do not update pos
I have a V1.1 grid that is not visible. When I set its selected indices by this code, it works the first time only.
_grid.selection.callMethod('clear');
_grid.selection.callMethod('select', [n]);
Subsequent calls to the code above with different indices does not update the grid when it becomes visible. The first selection lingers, and only the new selections take hold once a "selected" row is clicked.
I've tried calling "updateStyles" and "refreshItems" but no luck.
I was wondering if there is a method I can call to enforce a redraw/update/refresh on the selections.
Thank you.
I tested out with grid found in our marketing site: https://vaadin.com/elements/-/element/vaadin-grid. Selection should be done by only with one row:
$0.selection.clear();
$0.selection.select(n);