New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grid.select(item) does not highlight the newly selected row. #2031
Comments
Tested with the following example and could not reproduce: Grid<String> grid = new Grid<>();
grid.addColumn(string -> string);
grid.setSelectionMode(SelectionMode.SINGLE);
grid.setItems("foo", "bar");
grid.select("foo");
add(grid); See also the examples of programmatic selection: https://vaadin.com/components/vaadin-grid/java-examples/selection Closing as invalid. |
@web-padawan here's a screenshot of the log output: here's a screenshot of what I see in the browser: as you can see in the screenshots, other than me calling on my specific class to populate the grid, it's identical to yours. Also, based on the log output, it is "selecting" the first item fetched by default. However in the browser, no row is highlighted. I've greatly simplified this from what I'm trying to do for real. I'm actually working with a multi-select for real, but this appears to be the same issue regardless so I'm just using a single select here. thanks for your help. |
@mikethomas77055 did you solved it? It seems like items have different hashCode/equals results. |
@engor |
@mikethomas77055 thanks for reply! |
If i select a row programmatically the row is not marked as selected
The select method i used is this:
A row selection with the mouse marks the selected row in light-blue, but the programmatic (pre)selection does not highlight the selected row
The text was updated successfully, but these errors were encountered: