-
Notifications
You must be signed in to change notification settings - Fork 407
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
[DataGrid] Fix issue when scrolling horizontally and Virtualize="true" #3117
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Use correct spacer for Virtualize - Remove unused style - Only render row-type if not default
…rosoft/fluentui-blazor into users/vnbaaij/datagrid-issue
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 59.8%
|
dvoituron
approved these changes
Jan 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #3102 but it comes with a caveat...
The issue is there because we use a specific way of rendering the table (with
display: grid
), thead, tbody and tr (withdisplay: contents
). This is done to have compatibility with the previous way of rendering and allows for specifying column widths withfr
units. It is also necessary to have this for resizing the columns. Obviously, we do not want to (and will not) remove that option.The issue is fixed when using 'pure' HTML table rendering:
But it comes with the 'cost' of not being able to use
fr
units for sizing and does not work with a resizable grid. I think the resizing can be fixed but need some help with the JS.We decided to implement both ways of rendering by adding a new parameter
Rendermode
of typeDataGridRendermode
with optionsGrid
(default) and 'Table. With
Gridnothing changes from how DataGrids are being rendered right now. With
Table` the described specifics will not be used and everything will just be rendered as pure HTML table elements.You as the developer have the choice of specifying what
Rendermode
to use, taking into account the limitations of each mode.