Skip to content

Update event-handling.md#30900

Merged
guardrex merged 4 commits into
dotnet:mainfrom
sammychinedu2ky:patch-3
Nov 1, 2023
Merged

Update event-handling.md#30900
guardrex merged 4 commits into
dotnet:mainfrom
sammychinedu2ky:patch-3

Conversation

@sammychinedu2ky
Copy link
Copy Markdown
Contributor

@sammychinedu2ky sammychinedu2ky commented Nov 1, 2023

@guardrex guardrex self-assigned this Nov 1, 2023
Copy link
Copy Markdown
Collaborator

@guardrex guardrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

Let me add sample code here

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

I recommend waiting until the other PR merges first. It touches a lot of topics, and a merge conflict 😈 might be brewing here.

@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

@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!");
    }
}

@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

I recommend waiting until the other PR merges first. It touches a lot of topics, and a merge conflict 😈 might be brewing here.

alright got that 🚀

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

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.

@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

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 😅

@Rick-Anderson
Copy link
Copy Markdown
Contributor

Rick-Anderson commented Nov 1, 2023

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.

I don't see a PR labeled BIG 🐘, did you mean #30834
I've been waiting on an approved, but I'll do it now.

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

That's right, @Rick-Anderson ... I'd like to clear that big PR through, then I can proceed with other work, including this PR.

@Rick-Anderson Rick-Anderson reopened this Nov 1, 2023
@Rick-Anderson Rick-Anderson enabled auto-merge (squash) November 1, 2023 21:46
@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

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.

@guardrex guardrex disabled auto-merge November 1, 2023 21:46
@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

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.

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

... 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.

@Rick-Anderson Rick-Anderson enabled auto-merge (squash) November 1, 2023 21:56
@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

@guardrex can I add it now or should I still wait for the bug stuff to be resolved

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

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! 😄

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

@sammychinedu2ky .... Go ahead. Rick fixed the rotten 😈 here.

@Rick-Anderson
Copy link
Copy Markdown
Contributor

#30903

@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

done @guardrex

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

@sammychinedu2ky ... Check my updates and see if I broke anything 🙈😆.

@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

looks good to me @guardrex

@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

Happy Halloween too 🎃.. you have a costume?

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Nov 1, 2023

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.

@guardrex guardrex merged commit ab2043e into dotnet:main Nov 1, 2023
@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

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 😅

@Rick-Anderson
Copy link
Copy Markdown
Contributor

@sammychinedu2ky thanks for the PR. Your changes will be live in 10 minutes, can you look them over?

@sammychinedu2ky
Copy link
Copy Markdown
Contributor Author

@sammychinedu2ky thanks for the PR. Your changes will be live in 10 minutes, can you look them over?

looks good chief

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants