ParameterState: Fix when subscribing only to EventCallback#8457
Merged
ScarletKuro merged 1 commit intoMudBlazor:devfrom Mar 25, 2024
Merged
ParameterState: Fix when subscribing only to EventCallback#8457ScarletKuro merged 1 commit intoMudBlazor:devfrom
ScarletKuro merged 1 commit intoMudBlazor:devfrom
Conversation
Member
Author
|
@henon I'm merging this ASAP, but just FYI and I recommend you to rebase your branches where you work on ParameterState. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8457 +/- ##
==========================================
+ Coverage 88.76% 88.83% +0.06%
==========================================
Files 416 416
Lines 12359 12358 -1
Branches 2458 2458
==========================================
+ Hits 10971 10978 +7
+ Misses 855 846 -9
- Partials 533 534 +1 ☔ View full report in Codecov by Sentry. |
6 tasks
peterthorpe81
pushed a commit
to peterthorpe81/MudBlazor
that referenced
this pull request
Mar 25, 2024
henon
pushed a commit
that referenced
this pull request
Mar 25, 2024
(cherry picked from commit 61e8a76)
biegehydra
pushed a commit
to biegehydra/MudBlazor
that referenced
this pull request
Apr 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This fixes an interesting problem when you subscribe only to
EventCallbackand modify the child, for example you have content collapsed and you want to expand it via public method likeToggleAsync, the content would not expand, when it should.This problem was found here: #8446
Consider this as example:
Note that when you click on expansion, you are triggering inner child toggle method
Before
After
The line in unit tests that specifically tests that this moment is covered:
MudBlazor/src/MudBlazor.UnitTests/State/ParameterStateUsageTests.cs
Line 235 in 16d2339
and
MudBlazor/src/MudBlazor.UnitTests/State/ParameterStateUsageTests.cs
Line 250 in 16d2339
aka the content must show when clicked and state should correspond that it's opened, before the fix this would fail.
How Has This Been Tested?
New bUnit tests that took me few hours to make...
Types of changes
Checklist:
dev).