diff --git a/examples/crm.rs b/examples/crm.rs index 504459fc7..d4f3d1579 100644 --- a/examples/crm.rs +++ b/examples/crm.rs @@ -1,7 +1,7 @@ /* Tiny CRM: A port of the Yew CRM example to Dioxus. */ -use dioxus::prelude::*; +use dioxus::{events::FormEvent, prelude::*}; fn main() { dioxus::desktop::launch(app); diff --git a/packages/core/Cargo.toml b/packages/core/Cargo.toml index b19f6eeab..a26842da1 100644 --- a/packages/core/Cargo.toml +++ b/packages/core/Cargo.toml @@ -47,12 +47,12 @@ backtrace = "0.3" [dev-dependencies] anyhow = "1.0.42" -dioxus-html = { path = "../html" } fern = { version = "0.6.0", features = ["colored"] } rand = { version = "0.8.4", features = ["small_rng"] } dioxus-core-macro = { path = "../core-macro", version = "^0.1.2" } criterion = "0.3.5" thiserror = "1.0.30" +dioxus-html = { path = "../html" } [features] default = [] diff --git a/packages/html/src/events.rs b/packages/html/src/events.rs index 59f605cd5..6338b30e6 100644 --- a/packages/html/src/events.rs +++ b/packages/html/src/events.rs @@ -17,11 +17,11 @@ pub mod on { $( $( $(#[$method_attr])* - pub fn $name<'a, F>( + pub fn $name<'a>( factory: NodeFactory<'a>, - mut callback: F, + mut callback: impl FnMut($wrapper) + 'a, + // mut callback: impl FnMut(UiEvent<$data>) + 'a, ) -> Listener<'a> - where F: FnMut($wrapper) + 'a { let bump = &factory.bump();