-
Notifications
You must be signed in to change notification settings - Fork 448
Description
🐛 Bug Report
I have a data grid with a lot of items and virtualize is enabled. I see bad behavior when I use the mouse wheel to scroll up or down. The position of the scroll bar and the results of the data grid jump around randomly while scrolling.
💻 Repro or Code Sample
- Clone https://github.com/dotnet/aspire.git
- Open Aspire.slnx
- Run the
Stress.AppHost
project that is in the playground folder - The dashboard runs. Click the
...
button in the Actions column for thestress-apiservice
resource and chooseLog message limit
. This writes 10,000 logs. - Click on Structured logs page and scroll up and down in the data grid.
- Results jump around while scrolling.
🤔 Expected Behavior
Scroll position and results shouldn't jump around
😯 Current Behavior
I create all the logs, then I scroll up for a while (lots of jumping), then I scroll down (lots of jumping)
datagrid-scroll-jumping.mp4
💁 Possible Solution
I've double checked that grid items have a consistent height: ItemSize="46"
.
Also, I've check that the GetData is consistently returning the right total item count while scrolling (I assume the overall scroll height is based on this value)
Adding a large overscan to the data grid (i.e. 100) improves scrolling a lot. However, the results will still jump around if you scroll very quickly.
🔦 Context
🌍 Your Environment
- OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]
- Browser [e.g. Microsoft Edge, Google Chrome, Apple Safari, Mozilla FireFox]
- .NET and Fluent UI Blazor library Version [e.g. 8.0.2 and 4.4.1]