Grid Table: Same Request Sent Over and Over Again
See original GitHub issueURL (minimal example if possible):
embed.plnkr.co/ZnEpcAy5iKaukNXd
Given
- A grid table (
sap.ui.table.Table
) havingrows
aggregation bound with Northwind’s/Customers
. The service leverages server-side paging ("__next"
). - Low number of Table’s
threshold
.
Steps to reproduce the problem:
- Open the above example page and wait until the preview panel is loaded.
- Once the initial entries are loaded and the focus is set on the first row, press <kbd>Ctrl + End</kbd> to scroll to the end of the table. Do not scroll up afterwards.
- Wait until any entries are loaded in the scrolled area… forever.
What is the expected result?
The table gets filled in the visible rows.
What happens instead?
- Requests are sent constantly and which never stops. I waited for around an hour until the browser ultimately crashed (Probably due to highly accumulated memory footprint).
- If table’s
enableBusyIndicator
is set totrue
, the user cannot even scroll up anymore due to the busy indicator blocking all user interactions. Only when the user scrolls up until the previously loaded entries are visible, the table starts to get filled properly.
Any other information? (attach screenshot if possible)
I guess this behavior has something to do with the fact that the grid table involves both server- and client-side paging. Whether it’s an anti-pattern or not shouldn’t be a matter of this issue though.
Network trace showing the same request being sent over and over again
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Wait for backend service response before making changes to ...
Since I have access to the old value I can easily do something like event.node.setDataValue(event.column, event.oldValue) to revert the user's ...
Read more >Refreshing the Datasource of a Grid not working - Telerik
1. I make ajax call again. 2. I associated new data with grid's data source. 3. I called grid.dataSource.read();
Read more >Create a make table query - Microsoft Support
A make table query retrieves data from one or more tables, and then loads the result set into a new table. That new...
Read more >Grid Events - JavaScript Data Grid
This is a list of the events that the grid raises. You register callbacks for these events through the GridOptions interface. The name...
Read more >How to Integrate the Material UI Data Grid in React Using Data ...
Material UI's Data Grid is a powerful and flexible data table. ... The request can be of any APIs that send and receive...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
See also: https://github.com/SAP/openui5/commit/2005ea049891ed661349524681fd2abbb89c1db3
Hi guys,
So the endless loop should be fixed, as we have reworked the
$skip/$top
value calculation.The Northwind responds with a set of max. 20 entries and a
__next
link, even though the request sent by the ODataListBinding contains a$top
value of 60. We know that this can happen, and the approach of the ODataListBinding is to ignore the__next
link, and keep on sending consecutive requests with adapted$top
and$skip
values. This is ok, since following__next
links also ends up in multiple requests to satisfy the original data request by the table.Though if you aim for a productive scenario the mix of our
$skip/$top
based paging and the Northwind’s__next
paging mechanism is suboptimal, as it will end up in multiple requests, which cannot be optimized as easily.I would not advice to use such a mix in a real-life scenario.
Ideally you should just use a regular
$skip/$top
based paging. The Northwind also offers other collections, which will fully respect$skip/$top
, e.g.: https://services.odata.org/V2/Northwind/Northwind.svc/Product_Sales_for_1997?$skip=10&$top=60&$format=jsonAt the moment we have no intention to implement a server-side paging based on
__next
links, but of course contributions are welcome and appreciated if anyone out there wants to tackle this.BR, Thorsten