Update event-handling.md#30900
Conversation
There was a problem hiding this comment.
Thanks @sammychinedu2ky ... but I think that whole bit is weak because it isn't a fully-working, cut-'n-paste example. I'd like to work further on it, but I'm buried in work for the foreseeable future. I'll leave a note to myself in one of my tracking issues about it.
BTW - I'm going to hold this for a bit. I have a monster PR about to merge that I don't want to break with another PR at this time. I'll merge this as soon as the other one clears through.
|
Let me add sample code here |
|
I recommend waiting until the other PR merges first. It touches a lot of topics, and a merge conflict 😈 might be brewing here. |
@page "/parent"
@attribute [RenderModeInteractiveServer]
<ChildComponent OnClickCallback="@(async (value) => { await Task.Yield(); messageText = value; })" />
@code {
private string messageText = "";
}
and <h3>Child Component</h3>
<button @onclick="TriggerEvent">Click Me</button>
@code {
[Parameter]
public EventCallback<string> OnClickCallback { get; set; }
private async Task TriggerEvent()
{
// Trigger the event and pass a message
await OnClickCallback.InvokeAsync("Blaze It!");
}
}
|
alright got that 🚀 |
|
It might not matter, but I do want to merge the other BIG 🐘 PR first. That should happen today. I'm just waiting on Rick to arrive to do it because a stupid build warning that has nothing to do with the PR is blocking me from merging it. |
Alright 😅 |
I don't see a PR labeled BIG 🐘, did you mean #30834 |
|
That's right, @Rick-Anderson ... I'd like to clear that big PR through, then I can proceed with other work, including this PR. |
|
Ah! ... This isn't ready. I only needed the other one merged. I'll disable the auto-merge. Thanks @Rick-Anderson for taking care of the other one. |
|
Ok ... all good. @sammychinedu2ky ... Do you want to add that code, or do you want me to take it from here? ... and thanks for doing the legwork on it. I'm 😅 with a number of things to do over the next few weeks, and this is a big help in fixing up the code and example. |
|
... and as you can see, @Rick-Anderson, that crazy docs build bug is back here. Looks like it needs some SiteHelp. It's throwing on the merge-to-live PR, too, but at least it isn't blocking the merge there. Anyway, we still have some work to do on this PR, and this PR isn't blocking other work, so a delay is fine here for now. |
|
@guardrex can I add it now or should I still wait for the bug stuff to be resolved |
|
Thanks ... I didn't see that on my other PR, so I wasn't aware that it was showing up over here and on this branch. I should've looked. The 😈 got me for Halloween on this one ... I said, 'Trick or Treat!?' and got a TRICK! 😄 |
|
@sammychinedu2ky .... Go ahead. Rick fixed the rotten 😈 here. |
|
done @guardrex |
|
@sammychinedu2ky ... Check my updates and see if I broke anything 🙈😆. |
|
looks good to me @guardrex |
|
Happy Halloween too 🎃.. you have a costume? |
|
Yes, but I'm just a big, green dinosaur ... 🦖Thanks again for the PR work. It's much better now with a proper example in place that devs can try out. |
Awesome. My pleasure 😅 |
|
@sammychinedu2ky thanks for the PR. Your changes will be live in 10 minutes, can you look them over? |
looks good chief |
I think this explains the concept better
@guardrex
Internal previews