-
-
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
DataGrid: Change several public methods from async void to async Task and add Async postfix (Breaking Change) #6614
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev #6614 +/- ##
==========================================
- Coverage 90.63% 90.62% -0.01%
==========================================
Files 399 399
Lines 13565 13582 +17
==========================================
+ Hits 12294 12309 +15
- Misses 1271 1273 +2
... and 1 file 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. |
For some reason I can't request review from @tjscience, going to just tag |
A reminder why we should avoid asyn void in methods, lambdas etc:
That's why I want this to be considered for a merge, even though it's a breaking change. |
ApplyFilterAsync = x => | ||
{ | ||
//Use Task.CompletedTask but later ApplyFilter should return Task | ||
HeaderCell?.ApplyFilter(x); |
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.
This is added for future. There is currently unresolved issue "the get serverdata is not called when using filtermode"(when serverdata and filter are used together). And there might be need to call ReloadServerData (which is async) in ApplyFilter etc.
What do you think @tjscience ? |
I guess since this component is still marked as experimental on the docs as we speak we can just break now. |
@henon, Yes, this is a good catch @ScarletKuro. Changes look good, thanks! |
… and add Async postfix (Breaking Change) (MudBlazor#6614)
Description
This update addresses the issue of using async void in lambdas, which should be avoided whenever possible.
Previously, the design was as follows:
the SetSelectedItem, StartEditingItem, and other similar methods were defined as
Actions
instead ofFunc<Task>
. This update changes the signature of these methods to return a Task, eliminating the use of async void in the lambdas.Yes, this is breaking changed, but the sooner we fix this then better.
How Has This Been Tested?
Unit tests
Types of changes
Checklist:
dev
).