-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[Blazor] @bind async #22394
Copy link
Copy link
Closed
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueStatus: Resolvedaffected-mostThis issue impacts most of the customersThis issue impacts most of the 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)feature-razor.languageseverity-minorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Metadata
Metadata
Assignees
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueStatus: Resolvedaffected-mostThis issue impacts most of the customersThis issue impacts most of the 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)feature-razor.languageseverity-minorThis 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.
https://docs.microsoft.com/en-us/aspnet/core/blazor/data-binding?view=aspnetcore-3.1
Data-binding takes place with the following syntax:
this is equivalent of
I can use the
setterof the bound property to handle some extra logicI find myself starting with this pattern and then getting stuck because I need to call something async. I rewrite the thing to handle the events myself, but it feels a bit... not finished. It becomes a real pain if you have made a reusable component and you need to refactor a lot to make it work with the async call.
Can we introduce a convention to allow async calls with two way binding?