-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: Add ability to use SortBy on TemplateColumn. #6613
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev #6613 +/- ##
=======================================
Coverage 90.63% 90.63%
=======================================
Files 399 399
Lines 13565 13566 +1
=======================================
+ Hits 12294 12296 +2
+ Misses 1271 1270 -1
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
LGTM. Tho, in my head I was thinking more of using Guid than GetHashCode.. |
MSDN under Remarks:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, you decide about GetHashCode @tjscience
In my opinion, we do not need a truly unique id like GUID here. We only need uniqueness among the columns in the datagrid at any given time which GetHashCode provides easily since each TemplateColumn will be a different reference. I will change it though. It is only one line of code. |
…6613) * Added ability to use SortBy on TemplateColumn. * CHanged PropertyName implementation in TemplateColumn from hash code to GUID. --------- Co-authored-by: Terry Phillips <terry@nextcrew.com>
Description
You can now properly use SortBy on the TemplateColumn. Before, even though the parameter was exposed, it did not work because template columns do not have a PropertyName. I have implemented the PropertyName in TemplateColumn and set it to the column's hash code so that DataGrid has a reference to each template column when sorting.
How Has This Been Tested?
Visually. Also, added unit tests.
Types of changes
Checklist:
dev
).