vaadin / vaadin-grid

vaadin-grid is a free, high quality data grid / data table Web Component. Part of the Vaadin components.
https://vaadin.com/components
Apache License 2.0
399 stars 155 forks source link

fix: prevent unnecessary page fetches when scrolling to index #2203

Closed sissbruecker closed 2 years ago

sissbruecker commented 2 years ago

Description

Fixes the grid running into an infinite loop of data provider requests / scroll requests, when clearing items from the cache. This issue occurs in the Flow component, which clears items from the cache after loading new pages. This lead to the web component's scrollToIndex function to request the items for the previous viewport again, when then in turn causes the Flow component to clear the cache for the new viewport...and so on. The fix is to ensure that the grid does not request items for the previous viewport.

Fixes https://github.com/vaadin/flow-components/issues/2352

Type of change