question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Support both width and height in Blazor Virtualize

See original GitHub issue

Is 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:open
  • Created 3 years ago
  • Reactions:15
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
msynkcommented, Apr 16, 2022

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

4reactions
mkArtakMSFTcommented, Oct 5, 2022

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.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found