make signals non-breaking

This commit is contained in:
Evan Almloff committed 2023-08-07 14:50:36 -07:00
1 parent 84734c4146
commit ddbe913e79
5 files changed
+44 -22

No files matched your search

+4 -2
View File
@@ -1,4 +1,4 @@
use crate::prelude::EventHandler;use crate::{
use crate::{
any_props::AnyProps, arena::ElementId, Element, Event, LazyNodes, ScopeId, ScopeState,
};
use bumpalo::boxed::Box as BumpBox;
@@ -476,7 +476,7 @@ pub enum AttributeValue<'a> {
Bool(bool),
/// A listener, like "onclick"
Listener(EventHandler<'a, Event<dyn Any>>),
Listener(RefCell<Option<ListenerCb<'a>>>),
/// An arbitrary value that implements PartialEq and is static
Any(RefCell<Option<BumpBox<'a, dyn AnyValue>>>),
@@ -485,6 +485,8 @@ pub enum AttributeValue<'a> {
None,
}
pub type ListenerCb<'a> = BumpBox<'a, dyn FnMut(Event<dyn Any>) + 'a>;
/// Any of the built-in values that the Dioxus VirtualDom supports as dynamic attributes on elements that are borrowed
///
/// These varients are used to communicate what the value of an attribute is that needs to be updated