fix: namespacing of dynamic attributes
This commit is contained in:
1 parent
db5b65b6cb
commit
0bf4725639
9 files changed
+24
-31
No files matched your search
@@ -192,16 +192,16 @@ impl ToTokens for Element {
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, Debug, Hash)]
|
||||
pub enum ElementAttr {
|
||||
/// attribute: "valuee {}"
|
||||
/// `attribute: "value"`
|
||||
AttrText { name: Ident, value: IfmtInput },
|
||||
|
||||
/// attribute: true,
|
||||
/// `attribute: true`
|
||||
AttrExpression { name: Ident, value: Expr },
|
||||
|
||||
/// "attribute": "value {}"
|
||||
/// `"attribute": "value"`
|
||||
CustomAttrText { name: LitStr, value: IfmtInput },
|
||||
|
||||
/// "attribute": true,
|
||||
/// `"attribute": true`
|
||||
CustomAttrExpression { name: LitStr, value: Expr },
|
||||
|
||||
// /// onclick: move |_| {}
|
||||
|
||||
@@ -199,8 +199,8 @@ impl<'a> DynamicContext<'a> {
|
||||
let value = value.source.as_ref().unwrap();
|
||||
quote! {
|
||||
::dioxus::core::TemplateAttribute::Static {
|
||||
name: dioxus_elements::#el_name::#name.0,
|
||||
namespace: dioxus_elements::#el_name::#name.1,
|
||||
name: #name,
|
||||
namespace: None,
|
||||
value: #value,
|
||||
|
||||
// todo: we don't diff these so we never apply the volatile flag
|
||||
|
||||
Reference in new issue
Block a user