mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 04:33:06 +00:00
fix the double click event
This commit is contained in:
parent
fb40e72520
commit
438c03ad68
1 changed files with 1 additions and 17 deletions
|
@ -78,7 +78,7 @@ impl_event! {
|
|||
#[deprecated(since = "0.5.0", note = "use ondoubleclick instead")]
|
||||
ondblclick
|
||||
|
||||
// ondoubleclick: "ondblclick"
|
||||
ondoubleclick: "ondblclick"
|
||||
|
||||
/// onmousedown
|
||||
onmousedown
|
||||
|
@ -104,22 +104,6 @@ impl_event! {
|
|||
onmouseup
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn ondoubleclick<'a, E: crate::EventReturn<T>, T>(
|
||||
_cx: &'a ::dioxus_core::ScopeState,
|
||||
mut _f: impl FnMut(::dioxus_core::Event<MouseData>) -> E + 'a,
|
||||
) -> ::dioxus_core::MountedAttribute<'a> {
|
||||
::dioxus_core::Attribute::new(
|
||||
"ondblclick",
|
||||
_cx.listener(move |e: ::dioxus_core::Event<MouseData>| {
|
||||
_f(e).spawn(_cx);
|
||||
}),
|
||||
None,
|
||||
false,
|
||||
)
|
||||
.into()
|
||||
}
|
||||
|
||||
impl MouseData {
|
||||
/// Create a new instance of MouseData
|
||||
pub fn new(inner: impl HasMouseData + 'static) -> Self {
|
||||
|
|
Loading…
Reference in a new issue