fix: Limit the requested pages to a given threshold#2801
Conversation
|
I wonder if this could be fixed in the virtualizer instead. When the size gets changed, we could prevent the virtualizer from requesting updates to elements until the size change logic has finished restoring the original scroll position. |
Thanks Tomi! I'll try this approach. |
When the grid web-component is used with Flow Grid component with the undefined lazy loading, grid's size change leads to scroller jump to 0 index (iron list specifics). It causes as many pages requested from backend, as the current page is. E.g. if the page is 20, then the requested items range would be about 1000 items. And the requested items count increases as grid is being scrolled further. This issue is also observed within fast scroll, so the number of requested pages increases significantly. With this fix, if the pending pages count is too much and the current requested page is far away of pending page range, this page request will be ignored and the data provider wouldn't be called.
cc301ec to
c038e32
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
|
This ticket/PR has been released with platform 22.0.0.beta1 and is also targeting the upcoming stable 22.0.0 version. |








Description
When the grid web-component is used with Flow Grid component with the undefined lazy loading,
grid's size change leads to scroller jump to 0 index (iron list specifics).
It causes as many pages requested from backend, as the current page is.
E.g. if the page is 20, then the requested items range would be about 1000 items.
And the requested items count increases as grid is being scrolled further.
This issue is also observed within fast scroll, so the number of requested pages increases significantly.
With this fix, if the pending pages count is too much and the current requested page is far away of pending page range,
this page request will be ignored and the data provider wouldn't be called.
Type of change
Checklist
Additional for
Featuretype of change