-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
affected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-component-modelAny feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)Any feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)severity-blockingThis label is used by an internal toolThis label is used by an internal tool
Milestone
Description
In other words, a way to tell Blazor that a given event handler is part of a two-way binding even if you're not using @bind.
It would probably look like this:
<input value="@MyValue" @onchange="MyHandler" @onchange:enforceConsistency />... or maybe @onchange:sync or @onchange:twoWay. The implementation is simply to emit a builder.SetUpdatesAttributeName call for whatever is the "value" attribute for this element type (e.g., on <input type=checkbox> it would call builder.SetUpdatesAttributeName("checked");).
For more details about the scenario and justification for this design, see #17099 (comment)
ajruckman, gbryer, ryanbuening, JandosHk, JvanderStad and 5 more
Metadata
Metadata
Assignees
Labels
affected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-component-modelAny feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)Any feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)severity-blockingThis label is used by an internal toolThis label is used by an internal tool