MudDataGrid: Hierarchy ExpandAll/CollapseAll when one item is present#11904
MudDataGrid: Hierarchy ExpandAll/CollapseAll when one item is present#11904ScarletKuro merged 4 commits intoMudBlazor:devfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request resolves an issue where ExpandAll and CollapseAll functionality in MudDataGrid did not work correctly when there was only one item. The core change correctly adjusts the logic for determining the expanded state in HeaderCell.razor.cs by checking if the count of open hierarchies is greater than zero, instead of greater than one. A new unit test has been added to verify this fix, which is a great addition. The changes are logical and effectively address the reported bug. I have one minor suggestion to improve code clarity by removing a redundant call to StateHasChanged.
|
What about title: MudDataGrid: Fix ExpandAll/CollapseAll when only item item is present (or something like that)? |
|
Lol, the bot changed the title before even getting other opinions xD |
|
What about title: MudDataGrid: Hierarchy ExpandAll/CollapseAll when one item is present |
Resolves #11899 by setting the Expanded count > 0 instead of > 1
Checklist:
dev).Created a failing unit test
Made adjustment until it passed