-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Add method to indicate an event handler should enforce value consistency #17281
Copy link
Copy link
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
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
Type
Fields
Give feedbackNo fields configured for issues without a type.
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:
... or maybe
@onchange:syncor@onchange:twoWay. The implementation is simply to emit abuilder.SetUpdatesAttributeNamecall for whatever is the "value" attribute for this element type (e.g., on<input type=checkbox>it would callbuilder.SetUpdatesAttributeName("checked");).For more details about the scenario and justification for this design, see #17099 (comment)