Repository navigation
MudDialog: Update title, class and style of service-opened dialogs - #14116
Merged
danielchalmers merged 10 commits intoNov 2, 2026
Merged
danielchalmers merged 10 commits into
danielchalmers merged 10 commits into
Conversation
…t inlined. Add supporting unit test
Extend dialog dynamic update tests to Class and Style values.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…t instead of reassigning parameters Keeps the fix from overwriting [Parameter] properties (AGENTS.md) and drops the leftover questions in comments. Class already reads _dialog.Class in the class builder.
There was a problem hiding this comment.
No blocking issues found, and there are no earlier findings to carry over. A service-opened MudDialog now asks its container to re-render after each render. This can't loop: DialogHelperComponent only renders the content the first time it gets parameters, and the container's cascading value is fixed. For inline dialogs the only effect is one extra, harmless container render. CurrentStyle and CurrentTitleContent read the registered dialog's values at render time, the same way Classname already reads Class. The new tests exercise both changes, and their names and viewer components follow AGENTS.md.
This was referenced Nov 13, 2026
This was referenced Nov 24, 2026
This was referenced Dec 1, 2026
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.
In a dialog opened with IDialogService, MudDialog renders inside your content component, but MudDialogContainer renders the title bar and the outer element that carries
ClassandStyle. When the content component re-rendered, MudDialog re-rendered with it, but the container didn't. So changes toTitleContent,ClassorStylemade after the dialog opened never showed. Inline dialogs already forward their renders to the container, so they weren't affected.Changes:
StyleandTitleContentfrom the registered MudDialog when it renders, as it already did forClass. Before, it kept the copies taken when the dialog registered.The forwarding can't loop. The container renders the dialog content through a wrapper that renders it only once, so a container re-render doesn't re-render the content component. A test pins this with a reference-type dialog parameter.
Before
After
Related closed reports: #7201, #7039, #4519, #6896.
Replaces #13837 by KiristonK, whose commits this carries. That PR copied the dialog's values onto the container's parameters; this version reads them at render time instead.
Closes #13837