feat: virtualize entity lists (#302) #367
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One note -- I wasn't sure how best to insert the padding for the virtualization, since it's the whole page's scroll height that needs to be padded, and so in theory the padding could be put anywhere above and below the table contents. Initially I didn't use the window virtualizer and was just virtualizing the table itself, and had to insert extra rows to act as padding, but after switching to the window virtualizer, I ended up putting the padding on the table element, because that allows it to be just CSS padding while otherwise being as close as possible to the table contents.I've realized that when the virtualization can't keep up with the scroll speed, using rows as padding behaves better than putting CSS padding on the table. (When the padding is outside the table contents, the table header might become visible when scrolling upward; also, using a table row as padding means that the empty space has the same white background as the cells in most cases, although for some reason it seems to still sometimes shows the darker background of the table)