Modal
Modal copied to clipboard
SetTitle(string title) not work
Describe the bug SetTitle(string title) not work
To Reproduce Steps to reproduce the behavior: protected override void OnInitialized() => BlazoredModal.SetTitle("Enter a Message");
,but the title is empty
Expected behavior the title can be set by OnInitialized()
Screenshots
Hosting Model (is this issue happening with a certain hosting model?):
- Blazor Server
Additional context
Can you provide a repro project as I can't understand what you are doing based on your description
I just use this downloaded project, then run "Samples">"InteractiveServer"
when I click the button "Show Modal" from "Returning Data" page
, the popup shows but without title:
In the file "MessageForm.razor" > "protected override void OnInitialized() => BlazoredModal.SetTitle("Enter a Message");" there are a SetTitle() function but looks not works.
Can you provide a repro project as I can't understand what you are doing based on your description
The problem was introduced in this commit since you are preventing any re-rendering of the FocusTrap. The title sits within the FocusTrap, therefore the title itself never gets re-rendered.
The solutions would either to remove the following from focus trap:
Or it would be to change it so it would compare the child contents. If the child content is updated, we re-render the component.
Can create a PR with the fix of removing the ShouldRender tonight, but if there is a preference or reducing re-rendering I can make a PR for that instead.
Any update on this?
Yes, my problem was solved by removing the following code:
thank you :)
Is there a build pipeline for NuGet? Version 7.3.1 there still seems to have the problem.
@heckradr No there isn't yet. The PR has still not been reviewed or accepted.
@allrightsreserved The issue shouldn't be closed. You fixed the issue you had in the example project, but the nugget still has the error in it and the project on this repo still has it.
@chrissainty Can you please help us move this forward when you get a chance.
@heckradr No there isn't yet. The PR has still not been reviewed or accepted.
@allrightsreserved The issue shouldn't be closed. You fixed the issue you had in the example project, but the nugget still has the error in it and the project on this repo still has it.
@chrissainty Can you please help us move this forward when you get a chance.
reopened