Skip to content
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

fix: DataGrid scroll bar when Virtualize = true and scrolling fast. #3485

Open
StevenRasmussen opened this issue Mar 8, 2025 · 1 comment
Labels
triage New issue. Needs to be looked at

Comments

@StevenRasmussen
Copy link
Contributor

🐛 Bug Report

When scrolling fast (either with the mouse wheel or by grabbing the scroll bar) and the Grid has Virtualize = true, the scrollbar jumps around and does not scroll fluidly.

💻 Repro or Code Sample

Here is a screenshot of the demo site on the Virtualize page. Watch the scroll bar as I use the mouse wheel to scroll down on the page.:

Image

🤔 Expected Behavior

The grid should scroll without the scroll bar jumping around.

@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Mar 8, 2025
@PascalVorwerk
Copy link
Contributor

So I took a look at the code and I think this is being caused by the Task.Delay in the ProvideVirtualizedItemsAsync method.. this delay was made to avoid too many requests when scrolling quickly (as the comments say). If i remove the task delay, the scrolling seems pretty 'fluid' or atleast, it doesn't jump back and forth like you showed:

Bezig.met.opnemen.2025-03-08.223146.mp4

I'm not entirely sure on how we would want to fix this, as i can also see the benefit of trying to avoid too many requests from scrolling. The code comment itself suggests making this configurable or smarter by increasing the delay as the amount of requests increases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New issue. Needs to be looked at
Projects
None yet
Development

No branches or pull requests

2 participants