-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
enhancementNew feature or requestNew feature or requesthtmlRelated to the html crateRelated to the html crate
Description
Feature Request
In js you can use the event.target to see what the element is that you clicked on allowing you to have one click event but have more flexibility.
Implement Suggestion
For example
#[component]
pub fn menu() -> Element {
rsx! {
div {
class: "menu-left",
ul {
onclick: move |event| {
if event.target.tag_name == "li" { ... }
},
li { "Home" }
li { "About" }
li { "Contact" }
li { "Blog" }
}
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthtmlRelated to the html crateRelated to the html crate