Description
When using Virtualize component with ItemsProvider, I have noticed that the ItemsProvider is always called 3 times on the first render. This may be slightly excessive if we are calling an api inside the ItemsProvider.
As an example, I have a collection of 15000 items. On first render, the Virtualize component made 3 calls into the ItemsProvider:
- Request Count=20, Start Index=0
- Request Count=21, Start Index=14979 (=15000 - 21)
- Request Count=21, Start Index=0
I am guessing that the component is doing this for some initial setup calculations of the scroll bar etc...however, the question is whether these 3 calls can be obviated by a single initial call, or is there a way to specify any additional arguments to the component perform its setup without performing 3 calls into ItemsProvider.
Reproduction is here: https://github.com/bancroftway/blazorissuesrepro/tree/dotnet5vscoll
A small video demo is here: https://www.youtube.com/watch?v=5BnRgZTpO0M