-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Fix Virtualize table-mode scrolling in CSS Grid layouts (e.g. Aspire Dashboard) #66246
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,117 @@ | ||||||||||||||||||||||||||||||||||||||||
| @using System.Globalization | ||||||||||||||||||||||||||||||||||||||||
| @using System.Linq | ||||||||||||||||||||||||||||||||||||||||
| @using System.Reflection | ||||||||||||||||||||||||||||||||||||||||
| @using Microsoft.AspNetCore.Components.QuickGrid | ||||||||||||||||||||||||||||||||||||||||
| @using Microsoft.AspNetCore.Components.Web.Virtualization | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| <style> | ||||||||||||||||||||||||||||||||||||||||
| #aspire-like-grid { | ||||||||||||||||||||||||||||||||||||||||
| height: 476px; | ||||||||||||||||||||||||||||||||||||||||
| overflow: auto; | ||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
| } | |
| } | |
| #aspire-like-grid table.quickgrid { | |
| display: grid; | |
| grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 120px); | |
| width: 100%; | |
| } | |
| #aspire-like-grid table.quickgrid thead, | |
| #aspire-like-grid table.quickgrid tbody, | |
| #aspire-like-grid table.quickgrid tr { | |
| display: contents; | |
| } | |
| #aspire-like-grid table.quickgrid th, | |
| #aspire-like-grid table.quickgrid td { | |
| min-width: 0; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JS in this test uses
c.querySelectorAll('[aria-hidden]')to find Virtualize spacers, but that selector can match unrelated elements inside the grid (QuickGrid usesaria-hiddenin other places). This can makespacerBefore/spacerAftermeasurements unreliable. Restrict the selector to the expected spacer rows, e.g.tbody tr[aria-hidden](and ideally assert there are exactly 2).