Components participate in event handlers
This commit is contained in:
12 files changed
+86
-54
No files matched your search
@@ -804,6 +804,15 @@ impl<'a, 'b> IntoDynNode<'b> for &'a str {
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoDynNode<'_> for &String {
|
||||
fn into_dyn_node(self, cx: &ScopeState) -> DynamicNode {
|
||||
DynamicNode::Text(VText {
|
||||
value: cx.bump().alloc_str(&self),
|
||||
id: Default::default(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoDynNode<'_> for String {
|
||||
fn into_dyn_node(self, cx: &ScopeState) -> DynamicNode {
|
||||
DynamicNode::Text(VText {
|
||||
@@ -898,6 +907,12 @@ impl<'a> IntoAttributeValue<'a> for String {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoAttributeValue<'a> for &String {
|
||||
fn into_value(self, cx: &'a Bump) -> AttributeValue<'a> {
|
||||
AttributeValue::Text(cx.alloc_str(&self))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoAttributeValue<'a> for f64 {
|
||||
fn into_value(self, _: &'a Bump) -> AttributeValue<'a> {
|
||||
AttributeValue::Float(self)
|
||||
|
||||
Reference in new issue
Block a user