Open mrpmorris opened 1 year ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Why wouldn't you pass the item
and EventArgs
to the method?
@onclick="(e) => ToggleExpandedAsync(item, e)"
This follows the old event pattern:
void ToggleExpandedAsync(object sender, EventArgs e) { }
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Imaging a tree view component, where each item has an
@onclick=ToggleExpandedAsync
.The click event is triggered on both the element clicked, and also its parent node - causing both to collapse.
I could use
@onclick:stopPropagation
, but a pop-up menu component that listens for all clicks outside of its own area will not see the click and cannot now know when to automatically close itself.Describe the solution you'd like
Add
public string? ElementId { get; }
to the various event args (keyboard, mouse, etc), which is populated by the Id of the element that triggered the event.Additional context
Not sure what you'd do when a composite part of the element is interacted with. Possibly have the Blazor code walk up the parent tree until it found an Id?