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
In our application we have a Grid that displays items of a selected order. The pagesize of the grid depends on some settings and might change when selecting an order. The grid starts with 0 items, as no order is selected.
As soon as you select an order, the items and the pagesize are set.
Since Vaadin version 24.5.0 this causes the grid to render empty rows instead of the items.
I was able to narrow down the issue to ef3d165.
The problem is that changes to the size now clear the pending requests. In my case it seems like there is still a pending request, wehn the size gets changed to "0" from a gridConnector#reset call. Before this change, subsequent item refreshes were skipped as the request was still pending. Now the items are refreshed which causes the tr elements to be hidden (size = 0).
My current workaround is to revert the changes by using patching the Cache-prototype: Object.defineProperty(Cache.prototype, "size", { get: function() { return this.__size; }, set: function(v) { this.__size = v; } });
Expected outcome
The grid should render the rows normally
Minimal reproducible example
public MainView() {
var grid = new Grid<Integer>();
grid.addColumn(item -> item);
grid.setSelectionMode(Grid.SelectionMode.SINGLE);
add(grid);
Button refreshBtn = new Button(VaadinIcon.REFRESH.create());
refreshBtn.addClickListener(e -> {
grid.setItems(IntStream.range(0, 200).boxed().toList());
grid.setPageSize(100);
});
add(refreshBtn);
}
Steps to reproduce
Use the code pasted above
Open the page
Click the refresh button
Environment
Vaadin version(s): Since 24.5.0
Browsers
Issue is not browser related
The text was updated successfully, but these errors were encountered:
Description
In our application we have a Grid that displays items of a selected order. The pagesize of the grid depends on some settings and might change when selecting an order. The grid starts with 0 items, as no order is selected.
As soon as you select an order, the items and the pagesize are set.
Since Vaadin version 24.5.0 this causes the grid to render empty rows instead of the items.
I was able to narrow down the issue to ef3d165.
The problem is that changes to the size now clear the pending requests. In my case it seems like there is still a pending request, wehn the size gets changed to "0" from a
gridConnector#reset
call. Before this change, subsequent item refreshes were skipped as the request was still pending. Now the items are refreshed which causes thetr
elements to be hidden (size = 0).My current workaround is to revert the changes by using patching the Cache-prototype:
Object.defineProperty(Cache.prototype, "size", { get: function() { return this.__size; }, set: function(v) { this.__size = v; } });
Expected outcome
The grid should render the rows normally
Minimal reproducible example
Steps to reproduce
Environment
Vaadin version(s): Since 24.5.0
Browsers
Issue is not browser related
The text was updated successfully, but these errors were encountered: