Skip to content

MudBaseInput: Fix OnParametersSet for ParameterState#12136

Merged
ScarletKuro merged 1 commit intoMudBlazor:devfrom
ScarletKuro:input_fix
Nov 23, 2025
Merged

MudBaseInput: Fix OnParametersSet for ParameterState#12136
ScarletKuro merged 1 commit intoMudBlazor:devfrom
ScarletKuro:input_fix

Conversation

@ScarletKuro
Copy link
Member

@ScarletKuro ScarletKuro commented Nov 23, 2025

MudBlazor uses an hacky SubscribeToParentForm mechanism whose behavior is not fully understandable.
Because of this, we must manually call OnParametersSet on the ParameterContainer to ensure ParameterState fields update correctly.
Without this manual call, scenarios involving inherited components can fall out of sync. For example:

  • Component1 inherits a base component that defines a state parameter.
  • Component2 also inherits that same base component, wraps Component1, and forwards its base parameters to Component1.

In this case, ParameterState will not remain properly synchronized since base.OnParametersSet is called conditionally.

Checklist:

  • I've read the contribution guidelines
  • My code follows the style of this project
  • I've added or updated relevant unit tests

@mudbot mudbot bot added the bug Unexpected behavior or functionality not working as intended label Nov 23, 2025
@ScarletKuro ScarletKuro merged commit 3ec80a0 into MudBlazor:dev Nov 23, 2025
7 checks passed
@ScarletKuro ScarletKuro deleted the input_fix branch November 23, 2025 02:43
This was referenced Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant