You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description: When having a Grid with empty space in the bottom (row count less than grid's size). And, adding a new item(s) to backing (list) dataprovider, and using scrollToIndex to scroll to the end. Then, for each item, an empty row is shown in the top of the Grid like in the screenshot below:
Code example to reproduce the issue:
@Route("scrollTo")
@Theme(Lumo.class)
public class GridScrollToTest extends VerticalLayout {
private Grid<Dto> grid = null;
private ListDataProvider<Dto> dataProvider;
public GridScrollToTest() {
setSizeFull();
Button addItem = new Button("Add");
addItem.addClickListener(buttonClickEvent -> {
dataProvider.getItems().add(getNewMockDto());
dataProvider.refreshAll();
grid.scrollToIndex(dataProvider.getItems().size());
});
grid = new Grid<>(Dto.class);
List<Dto> data = new ArrayList<>();
for (int i = 0; i < 10; i++) {
data.add(getNewMockDto());
}
dataProvider = new ListDataProvider<>(data);
grid.setDataProvider(dataProvider);
add(addItem, grid);
}
private Dto getNewMockDto() {
return new Dto(UUID.randomUUID().toString());
}
public static class Dto {
private String uuid;
public Dto(String uuid) {
super();
this.uuid = uuid;
}
public String getUuid() {
return uuid;
}
}
}
The text was updated successfully, but these errors were encountered:
scrollToEnd seems to have the exact same issue. And it's not just additional empty space at the top: when this happends it seems to remove/replace my top most item. This seems to be triggered when adding an item makes scrolling necessary.
Vaadin 14.1.17, Chome (Win 10).
Issue description: When having a Grid with empty space in the bottom (row count less than grid's size). And, adding a new item(s) to backing (list) dataprovider, and using
scrollToIndex
to scroll to the end. Then, for each item, an empty row is shown in the top of the Grid like in the screenshot below:Code example to reproduce the issue:
The text was updated successfully, but these errors were encountered: