1
0
Jonathan Kelley 3 жил өмнө
parent
commit
06276edd0d

+ 1 - 1
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);

+ 1 - 1
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 = []

+ 3 - 3
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();