-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Description
The description of how to use bind:after contains the following text:
To execute asynchronous logic after binding, use
@bind:after="{EVENT}"with a DOM event for the {EVENT} placeholder. An assigned C# method isn't executed until the bound value is assigned synchronously.
I think this contains a (very confusing, IMO) cut-and-paste error from the earlier code about bind:event, which (correctly) reads:
Bind a property or field on other DOM events by including an @Bind:event="{EVENT}" attribute with a DOM event for the {EVENT} placeholder.
But the @bind:after attribute does not have a value which which is a DOM event. It has a value that's the name of a method (or delegate) to be called after the event has occurred. It should probably read something more like like:
To execute asynchronous logic after binding, use
@bind:after="{DELEGATE}". An assigned C# method [perhaps this should read "delegate" instead?] isn't executed until the bound value is assigned synchronously.
This problem was there in the 8.0 docs (maybe earlier) and is still in the 10-preview docs.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/data-binding?view=aspnetcore-9.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/components/data-binding.md
Document ID
3f912dfc-5ba5-6c6c-ba93-1ae78508a5cc
Article author
Metadata
Metadata
Assignees
Labels
Type
Projects
Status