Struct dioxus_core::prelude::Event
source · Expand description
A wrapper around some generic data that handles the event’s state
Prevent this event from continuing to bubble up the tree to parent elements.
Example
ⓘ
rsx! {
button {
onclick: move |evt: Event<MouseData>| {
evt.cancel_bubble();
}
}
}Fields§
§data: Rc<T>The data associated with this event
Implementations§
source§impl<T> Event<T>
impl<T> Event<T>
sourcepub fn cancel_bubble(&self)
👎Deprecated: use stop_propagation instead
pub fn cancel_bubble(&self)
Prevent this event from continuing to bubble up the tree to parent elements.
Example
ⓘ
rsx! {
button {
onclick: move |evt: Event<MouseData>| {
evt.cancel_bubble();
}
}
}sourcepub fn stop_propagation(&self)
pub fn stop_propagation(&self)
Prevent this event from continuing to bubble up the tree to parent elements.
Example
ⓘ
rsx! {
button {
onclick: move |evt: Event<MouseData>| {
evt.cancel_bubble();
}
}
}