-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Blazor Virtualize 22-25 items #25915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm experiencing a similar issue. My chat log consistenly shows the last 24 messages, removing older messages when new ones are added to the virtualized items. I can make the number of messages change when I resize the div, but that sometimes results in elements overlapping each other and not appearing in the correct positions. I haven't tried implementing my own ItemsProvider to resolve the issue. |
Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project (ideally a GitHub repo) that illustrates the problem. |
no rocket science.- but https://github.com/hannespreishuber/Blazor5App |
@GarettCooper I think your issue is different and may be due to some unwanted interactions between CSS and In fact looking at your screenshots, it appears that the items in your list aren't of a fixed equal height. The We are tracking support for variable-sized items in a future release at #26099. In the meantime, instead of using |
@hannespreishuber Thanks for the repro information. I was able to observe this issue and have tracked down the underlying cause. The issue happens when WorkaroundIf you want to work around this in your own code, it's reasonably easy. You just need to pass an accurate So then I supplied this information to <Virtualize Items="forecasts" Context="forecast" ItemSize="48.89f">
<tr @key="forecast.Counter">
... etc ...
</tr>
</Virtualize> ... and now it behaves correctly and doesn't get stuck. If you don't like relying on arbitrary-seeming values like 48.89, then it's probably best to use CSS to force the items to be a specific known height. For example in your Fixing it in the frameworkI have prepared a fix for |
Thanks - I can live with that workaround, as I want to support blazor to reach the best tool, missing size is unexpected behavior. Needs a remark in docu and/or a warning in Visual Studio of missing size attribute on compile. |
@SteveSandersonMS Thanks for letting me know, the height issue did occur to me but I couldn't find any documentation confirming or denying that Virtualize only supported items with consistent heights. When I saw Virtualize in the blog post I was hoping for a silver bullet, but I guess I'll have to look in to writing my own solution. |
Thanks for contacting us. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
extended Weatherservice to 500 records, added a ID property named Counter (incremented)
Changed fetchdata.razor
shows only 22-25 rows in Browser
ASP.NET Core version 5 5.0.100-rc.1.20452.10
Version 16.8.0 Preview 3.0
The text was updated successfully, but these errors were encountered: