MudDataGrid: Preserve initial sort definitions in single mode - #13749
Merged
danielchalmers merged 1 commit intoAug 31, 2026
Merged
Conversation
Member
|
Thanks! |
This was referenced Sep 14, 2026
This was referenced Sep 14, 2026
This file contains hidden or 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
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.
Fixes #9021.
MudDataGrid.SetParametersAsynccompared the first incomingSortModewith the parameter's default value, so an initialSinglemode was treated as a later mode transition and cleared caller-providedSortDefinitions. This change limits that clearing to post-first-render mode changes, preserving the existing behavior for real transitions.Before/After:
B, A, C).A, B, C).Tests:
dotnet test --project src/MudBlazor.UnitTests/MudBlazor.UnitTests.csproj --no-restore /p:SkipBunCompile=true -- --filter "FullyQualifiedName~DataGridSortDefinitionsPreservedOnInitialSingleModeRender" --output Normal --no-ansi --hangdump --hangdump-timeout 120sdotnet test --project src/MudBlazor.UnitTests/MudBlazor.UnitTests.csproj --no-build --no-restore -- --filter "FullyQualifiedName~DataGridTests.DataGridSort" --output Normal --no-ansi --hangdump --hangdump-timeout 120sdotnet test --project src/MudBlazor.UnitTests/MudBlazor.UnitTests.csproj --no-build --no-restore -- --filter "FullyQualifiedName~DataGridCustomSort|FullyQualifiedName~DataGridFilteredItemsCache" --output Normal --no-ansi --hangdump --hangdump-timeout 120sdotnet format whitespace --no-restore --verify-no-changes --include MudBlazor/Components/DataGrid/MudDataGrid.razor.cs MudBlazor.UnitTests/Components/DataGridTests.csAI assistance was used through Codex with GPT-5.6 Sol for investigation, implementation, test drafting, and diff review. Human verification: before submission, the contributor confirmed that the attached screenshots from the local Viewer run show the same scenario changing from
B, A, CtoA, B, C.Checklist: