Plugin "ui-virtualization": Infinte Scrolling not working properly when initial list is too small to overflow


I posted this issue at the “ui-virtualization” plugin’s GitHub page several weeks ago:

So far, unfortunately I didn’t get any feedback yet. It seems there hasn’t been much activity on that sub-project recently, so I’m wondering if it may have been abandoned - or maybe Discourse is a better place to ask for help?


Your use case is not typical, I guess.
But as well important.

What prevents you from getting more items @ the start?
if there is not enough items you could implement a “get more” link… if you know there is more…

It is an edge case.
If you see possible general improvement to the plugin, please consider providing a pull request.


Thank you for your feedback.

Well, technically I can get more items at the start. I don’t have an exotic use case that prevents me from doing that. I’m thinking more in terms of general robustness and scalability of the plugin.

The problem is that I have to “guess” how many initial items are enough. If some user has a really high-resolution display and I didn’t anticipate this during development, the UI breaks for that user.

So either I use a fixed value for initial array size that may be way too large for small screens (meaning bad response time) and possibly still to small for some very large screens (breaking the UI) … OR I somehow calculate the necessary minimum number of initial items dynamically, which isn’t easy and rather error prone. It would be nice if the plugin could do that by itself.

So to sum this up, I don’t think this is an edge case at all. But maybe I’m just thinking too complicated, and there’s an easy solution?