wip: fix props update

This commit is contained in:
Jonathan Kelley committed 2021-09-13 12:42:38 -04:00
1 parent 5a09ec1610
commit 79e8df26f5
4 files changed
+14 -21

No files matched your search

+3 -1
View File
@@ -12,7 +12,6 @@ use std::{
cell::{Cell, RefCell},
fmt::{Arguments, Debug, Formatter},
marker::PhantomData,
rc::Rc,
};
/// A composable "VirtualNode" to declare a User Interface in the Dioxus VirtualDOM.
@@ -245,6 +244,8 @@ pub struct Attribute<'a> {
/// An event listener.
/// IE onclick, onkeydown, etc
pub struct Listener<'bump> {
/// The ID of the node that this listener is mounted to
/// Used to generate the event listener's ID on the DOM
pub mounted_node: Cell<Option<ElementId>>,
/// The type of event to listen for.
@@ -252,6 +253,7 @@ pub struct Listener<'bump> {
/// IE "click" - whatever the renderer needs to attach the listener by name.
pub event: &'static str,
/// The actual callback that the user specified
pub(crate) callback: RefCell<Option<BumpBox<'bump, dyn FnMut(SyntheticEvent) + 'bump>>>,
}