Skip to content

BLAZOR - @bind-Value:after stopped working after update2 #11850

@Terrence77

Description

@Terrence77

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The method called in @bind-Value:after never gets called. (OnColorChanged)

Expected Behavior

I expect the behavior to be like it was before the last update.

The method called in @bind-Value:after to be called. (OnColorChanged)

Steps To Reproduce

Add this to the home page of a new blazor project. Note the OnColorChanged never gets called.

@page "/"

<PageTitle>Home</PageTitle>

<h1>Hello, world!</h1>

<InputSelect @bind-Value="selectedColor" @bind-Value:after="OnColorChanged">
	@foreach (var color in colors)
	{
		<option value="@color">@color</option>
	}
</InputSelect>

<p>You selected: @selectedColor</p>

@code {
	private string selectedColor = "Red";
	private List<string> colors = new() { "Red", "Green", "Blue" };

	private void OnColorChanged()
	{
		// This code runs after selectedColor is updated
		Console.WriteLine($"Color changed to: {selectedColor}");
	}
}

Exceptions (if any)

No response

.NET Version

.net 9

Anything else?

I have 100s of InputSelect, ok only 32, that no longer work.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions