-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
MudDataGrid: Custom comparer #10156
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
MudDataGrid: Custom comparer #10156
Conversation
…n methods * Add `SelectionComparer` property of type `IEqualityComparer<T>` to `MudDataGrid` * Update `SetSelectedItemAsync` and `SetSelectAllAsync` methods to use `SelectionComparer` for row selection * Update `Selected` property in `CellContext` to use `SelectionComparer` for checking if a cell is selected
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #10156 +/- ##
=======================================
Coverage 91.22% 91.23%
=======================================
Files 411 411
Lines 12484 12496 +12
Branches 2434 2435 +1
=======================================
+ Hits 11389 11401 +12
Misses 552 552
Partials 543 543 ☔ View full report in Codecov by Sentry. |
src/MudBlazor.UnitTests.Viewer/TestComponents/DataGrid/DataGridSelectionComparerTest.razor
Outdated
Show resolved
Hide resolved
|
LGTM. I will do some manual testing later and merge it. |
|
|
Thanks |



Description
Adds a
Comparerproperty toMudDataGridand update selection methodsComparerproperty of typeIEqualityComparer<T>toMudDataGridSetSelectedItemAsyncandSetSelectAllAsyncmethods to useComparerfor row selectionSelectedproperty inCellContextto useComparerfor checking if a cell is selectedResolves #10139
How Has This Been Tested?
Unit test created and test viewer component added
Type of Changes
Checklist
dev).