Feature Request: Support both width and height in Blazor Virtualize
See original GitHub issueIs your feature request related to a problem? Please describe.
I am trying to display several thousand image thumbnails in a grid layout with Blazor and virtualize scrolling through the thumbnail gallery to improve performance.
Describe the solution you’d like
The ability to set both the known width and height of the elements within a <Virtualize>
component in Blazor, and have the virtualization take into account multiple items per “row”, whether the number of items per “row” is dynamic based on the available width of the container and the provided ItemWidth
. Something like this:
<div>
<Virtualize Items="@images" ItemWidth="200" ItemHeight="200">
<div style="display: inline-block; width: 200px; height: 200px;">
<img src="@context.Url" />
</div>
</Virtualize>
</div>
Additional context
Apologies if this is somehow already possible and a couple of hours of Googling hasn’t led me to the answer - I’m new to Blazor.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:15 (7 by maintainers)
Top Results From Across the Web
ASP.NET Core Razor component virtualization
This article explains how to use component virtualization in ASP.NET Core Blazor apps. Improve the perceived performance of component ...
Read more >ASP.NET Core Blazor performance best practices
Tips for increasing performance in ASP.NET Core Blazor apps and avoiding common performance problems.
Read more >Blazor Virtualize component not rendering items on scroll
The number of items requested here depends on the current height of the component, the height of each item (50 px by default)...
Read more >Issue with virtual scrolling after migration Telerik.Blazor.UI ...
Hi,I've migrated my project to version 3.0 and I've issue with row virtualization.Before migration virtualization was working fine.
Read more >Blazor MultiColumnComboBox - Virtualization - Telerik UI for ...
It can work both with local data that the view-model already has, or you can fetch remote data every time the user scrolls...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think it’s a useful feature as other frameworks have it working seamlessly like the list components in the Microsoft Fluent UI library:
https://developer.microsoft.com/en-us/fluentui#/controls/web/list
After further discussion we’ve concluded that this ask is about bringing support for wrap-style list (multiple items per row) and given a fixed width we can potentially do this.