Feat: solve some issues regarding listeners
This commit is contained in:
1 parent
6084fbcd11
commit
dfaf5adee1
22 files changed
+192
-168
No files matched your search
@@ -0,0 +1,15 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
let g = dioxus::prelude::LazyNodes::new(move |__cx: NodeFactory| {
|
||||
use dioxus_elements::{GlobalAttributes, SvgAttributes};
|
||||
__cx.element(
|
||||
dioxus_elements::button,
|
||||
__cx.bump()
|
||||
.alloc([dioxus::events::on::onclick(__cx, move |_| {})]),
|
||||
__cx.bump().alloc([]),
|
||||
__cx.bump().alloc([]),
|
||||
None,
|
||||
)
|
||||
});
|
||||
}
|
||||
+2
-1
@@ -3,7 +3,7 @@ use std::cell::Cell;
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_core::{
|
||||
nodes::{VElement, VText},
|
||||
RealDomNode,
|
||||
ElementId,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
@@ -33,6 +33,7 @@ const Example: FC<()> = |cx| {
|
||||
}
|
||||
"h4"
|
||||
div { "h5" }
|
||||
button { }
|
||||
Child {}
|
||||
})
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user