-
-
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: Filter for Nullable DateTime not working(#6521) #6607
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev #6607 +/- ##
==========================================
- Coverage 91.41% 90.47% -0.94%
==========================================
Files 398 398
Lines 14955 13487 -1468
==========================================
- Hits 13671 12203 -1468
Misses 1284 1284
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. |
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.
I think there is a typo FiledType
instead of FieldType
You are right. Ty for noticing, this would be a disaster 😭. |
I am sure this is gonna create a lot of conflicts though :( |
The RenderFragments change - yes :( But it was really bad before. |
Thanks @ScarletKuro ! @tjscience FYI |
…MudBlazor#6607) * MudDataGrid: Filter for Nullable DateTime not working(MudBlazor#6521)
Description
Fixes #6521.
In the previous implementation, the code was checking for
f.dataType == typeof(DateTime)
in the razor file, which caused issues with filters not working correctly. The problem was that it did not account for nullable DateTime types.To fix this, I added a new public property called
FieldType
to theFilterDefinition
class, which checks for nullable types. TheFieldType
type already has all the necessary tests and works as expected. The updated code now usesf.FieldType.IsDateTime
instead off.dataType == typeof(DateTime)
. Additionally, I updated all the rest type checks to useFieldType
instead.I had to redo all the RenderFragments in
MudDataGrid.razor
due to compatibility issues with Visual Studio 2022. The file was not editable and caused a lot of problems, but everything is parsing smoothly now.How Has This Been Tested?
Docs, reproduction snippet
Types of changes
Checklist:
dev
).