-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MudDataGrid: Multi Level Grouping #11243
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
Conversation
…Pixels, Parent, and Level
- Updated grouping functions in `DataGridGroupingMultiLevelTest.razor` to handle nullable values. - Enhanced rendering structure in `DataGridGroupRow.razor` for better maintainability. - Added constructor and refactored properties in `DataGridGroupRow.razor.cs`. - Replaced `_allGroups` with `_groupDefinitions` in `MudDataGrid.razor` for structured group management. - Significant refactor in `MudDataGrid.razor.cs` to support multi-level grouping with new classes. - V2
- Updated `DataGridGroupingMultiLevelTest.razor` to improve grouping functionality. - Restructured HTML in `DataGridGroupRow.razor` for better readability. - Commented out unused `DataGridGroupData` class in `DataGridGroupRow.razor.cs`. - Required `DataGrid` and `Items` parameters in `DataGridGroupRow`. - Improved table rendering logic in `MudDataGrid.razor`. - Changed visibility of properties in `MudDataGrid.razor.cs` for better encapsulation. - Refined grouping logic in `MudDataGrid.razor.cs`. - Added `DataGridVirtualizeRow.razor` for row virtualization. - Created `DataGridVirtualizeRow.razor.cs` to define logic for the new component. - V2
- Modified `PropertyColumn` elements in `DataGridGroupingMultiLevelTest.razor` to include the `Grouping` attribute. - Updated item resolution logic in `DataGridVirtualizeRow.razor` to handle grouped scenarios correctly. - Made the `ProcessGroup` method static in `MudDataGrid.razor.cs` for improved performance and clarity. - Added a line to store the selector of the current group in a `selectors` list. - V2
- Enclosed `else if` condition in braces in `DataGridVirtualizeRow.razor` for better readability. - Updated comments in `MudDataGrid.razor.cs` to replace "group" with "groupedColumns" for clarity. - Modified group processing logic to consistently use "groupedColumns" terminology. - Introduced `AddGroupItems` method to enhance the hierarchy building of grouped columns. - V2
Replaced `_lastGroup` and `_groupDefinitions` with a single `_groupDefinition` variable to simplify grouping logic. Introduced `_groupedItems` for direct storage of grouped items, enhancing clarity and maintainability. Updated grouping logic to support hierarchical multi-level grouping. Modified expand and collapse methods to use the new `_groupDefinition`.
- Modified `GroupStyleFunc` to allow null assignment. - Simplified `SetGroupingAsync` in `Column.razor.cs`. - Added null checks in `DataGridGroupRow.razor` for safety. - Introduced `_innerGroupItems` in `DataGridGroupRow.razor.cs`. - Added `SyncInnerGroupItems` method for better synchronization. - Cleaned up `MudPopover` attributes in `MudDataGrid.razor`. - Removed unused variables and methods in `MudDataGrid.razor.cs`. - V2
- Changed grouping parameter handler to synchronous in Column.razor.cs. - Refactored click event for group expansion in DataGridGroupRow.razor. - Updated CSS class names for group indentation in DataGridGroupRow.razor.cs. - Added DataGrid.ChangedGrouping() calls in HeaderCell.razor.cs to ensure state updates. - Enhanced styling structure in _datagrid.scss for improved row indentation.
Introduce internal state parameters for group expansion and order in the Column class. Add event callbacks for GroupByOrder and GroupExpanded changes. Update the Expanded property in DataGridGroupRow to use a backing field for better state management. Refactor group expansion and collapse methods to support asynchronous operations. Overall improvements for better handling of grouped rows in the data grid.
- Updated event handlers back to asynchronous methods. - Simplified properties in `DataGridGroupRow.razor.cs` using auto-implemented properties. - Enhanced `GetGroupDefinitions` for better group management. - Updated `DataGridGroupRow` to utilize new grouping logic. - V2
- Made `DataGridAggregationTest` asynchronous and added `await` for `ExpandAllGroups`. - Removed unnecessary `using` directives in `CategoryAttribute.cs` - new static class `DataGrid` with constants for various data grid categories. - Annotated properties in `DataGridGroupRow.razor.cs` with `Category` attributes for better organization. - Added `Category` attributes to properties in `DataGridVirtualizeRow.razor.cs`. - V2
…nsion state between renders and regrouping.
This reverts commit da3f71d.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #11243 +/- ##
==========================================
- Coverage 91.10% 91.08% -0.03%
==========================================
Files 436 439 +3
Lines 14145 14229 +84
Branches 2731 2758 +27
==========================================
+ Hits 12887 12960 +73
- Misses 637 639 +2
- Partials 621 630 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sorry this comes a bit late, but there is a way to merge a PR with multiple authors so @versile2 's authorship could have been marked into the commit. I don't remember exactly off the top of my head how but I have done it before and I just wanted to tell you so we can look it up and do it right next time. Big thanks to @versile2 for doing most of the work on this! |
I set @versile2 as co-author, idk if I can set him as main author |
Thanks for thinking of me, but I will make it clear I do like accolades but that's not why I do it. I enjoy it. And frankly @ScarletKuro fixes enough of my code and helps me improve so I should probably be sub author :P Thanks @ScarletKuro |
I see. I was misled by github then. |
Description
Original PR: #11083 I screwed up and have to open a new PR.
Introduce Multi Level Grouping to MudDataGrid without any breaking changes.
Resolves #7587
Resolves #5654
Created two-way bind for GroupExpanded and GroupByOrder
Also consolidated logic for showing items in DataGridVirtualizeRow
How Has This Been Tested?
Visually, Unit Tests
Type of Changes
Checklist
dev
).