-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Issues with hot reloading html changes from a Razor file when @bind is used in Blazor WASM .NET 6 Preview 3 #51855
Comments
@joecuevasjr Do you see any error output in the console where you ran |
@danroth27 There is no error output in the console. After editing the h1 header the console reports success (with no hot reload action or restart of the app):
|
Thanks for contacting us. |
Converted into pure C# terms, this happens when editing a class like this: public partial class Counter : Microsoft.AspNetCore.Components.ComponentBase
{
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.AddMarkupContent(0, "Hello");
__builder.OpenElement(1, "input");
__builder.AddAttribute(2, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(_searchTerm));
__builder.AddAttribute(3, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => _searchTerm = __value, _searchTerm));
__builder.SetUpdatesAttributeName("value");
__builder.CloseElement();
}
private string _searchTerm;
} ... and changing the literal I guess it's likely the same issue as https://github.com/dotnet/aspnetcore/issues/31909 because of the lambda. |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @CoffeeFlux Issue DetailsUsing the @Bind razor directive attribute breaks hot reloading HTML elements in a razor component, specifically in a Blazor WebAssembly app. To ReproduceDefine a razor component with HTML and a @Bind razor directive attribute
-Run the Blazor WebAssembly application with Hot Reload. Further technical details
|
cc @lambdageek |
@lambdageek what is the status here? |
This is a |
@lambdageek are we still targeting 6.0 for fixing this? |
This is essentially a duplicate of #50249
That means that editing text on pages with existing
Adding new |
@lambdageek, what is the status of this? |
Fixed by #63513 |
Using the @Bind razor directive attribute breaks hot reloading HTML elements in a razor component, specifically in a Blazor WebAssembly app.
To Reproduce
Define a razor component with HTML and a @Bind razor directive attribute
-Run the Blazor WebAssembly application with Hot Reload.
-Change the h1 heading text in the code above, the HTML element will not update after "Hot reload of changes succeeded" message from the cli.
Further technical details
The text was updated successfully, but these errors were encountered: