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.
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