-
-
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
MudExpansionPanel: Use ParameterState, remove obsolete API and change to async API #8446
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #8446 +/- ##
==========================================
+ Coverage 88.84% 88.86% +0.01%
==========================================
Files 416 416
Lines 12358 12307 -51
Branches 2458 2447 -11
==========================================
- Hits 10980 10937 -43
+ Misses 845 836 -9
- Partials 533 534 +1 ☔ View full report in Codecov by Sentry. |
I don't understand why we need the |
If you only care about getting notifications I think this should still be valid usage? |
True 😂 I just saw it was using |
It will not work currently if you just subscribe only to |
9404089
to
027833e
Compare
Description
Fixes: #8429
Breaking Changes:
Remove
IsInitiallyExpanded
It's not necessary anymore.
You can either set a constant
StateHasChanged
will not reset on re-render back to constant because we avoided writing to the Parameter https://learn.microsoft.com/en-us/aspnet/core/blazor/components/overwriting-parameters?view=aspnetcore-8.0or you can use two way binding.
To set the initial expansion.
Change API to be async.
This component was firing
EventCallback
s in a fire-and-forget manner. We changed all the API to be async.Simplify code
We do not need
_collapseIsExpanded
variable orupdateParent
arguments, since theParamterState
manages the state correctly, therefore everything can be done in a more simple way.How Has This Been Tested?
Visual, current unit tests, new unit test.
Types of changes
Checklist:
dev
).