-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Components topic code example updates #12893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There is no difference in behavior between the two in your example. The first one is just a short version. The second format is useful if you want to specify an event other than |
Thanks ..... yes .... it all makes sense now. 😄 ...... i.e., I got 😵 on it. |
WRT my point number 2 .... do you think we should call that out in the topic? I could draft some text here for you to look at. |
@ajaybhargavb "it all makes sense" ... famous last words for my tombstone. 😄 RIP I went back to the original PR #12756. At https://github.com/aspnet/AspNetCore.Docs/pull/12756/files#diff-5cf16565c6014e97ab5fd792aba7b93dR24 ... it preserves the However, at https://github.com/aspnet/AspNetCore.Docs/pull/12756/files#diff-aec5790e12a05d20a3cda92a708f6679R123, it removes the It looks like what we need to do here is take that |
Also note that the <input type="text" @bind-value="@CurrentValue" @bind-value:event="oninput" /> ... and my original change on this PR was to make the text match (but for
So, I assume that there's a difference between |
Nope. Both |
ok ... I'll shape this PR up and ping u back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please make sure the samples actually run and render properly.
@ajaybhargavb kk ... that should get it. 🤞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #12892
Skip these remarks and access the diff. My confusion was cleared in the discussion.
This PR has the final set of updates that we need.
RE: Update blazor docs to reflect directive attributes changes (aspnet/AspNetCore.Docs #12756)
WRT the temporary (Pre6) need to place an
@
on a field/property value of an@bind
directive. I looked at Implement directive attribute feature for components (aspnet/AspNetCore #6364), but none of the description discusses the scenario.For example in the Format strings section of the Components topic, updates didn't add the
@
to the value forStartDate
...Same thing in the
ParentYear
examples (@bind-{property}
syntax) ...... and should devs apply the
@
-value temporary rule to@bind-value:event
/bind-{property}:event
? It was left on the updates as ...What's the difference between the following, if any:
Is the former just a shorthand way of setting up
onchange
binding? If they are the same, it isn't considered better to have Just One Consistent Way™️ 😄 to do it (the latter approach, which comports with otheron{event}
binding)?