You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain HTML attributes, such as 's "disabled", are supposed to be present for true and missing for false. Does render have any way to dynamically choose whether an attribute is output?
and use From<(String, String)> and From<(String, bool)> to generate HtmlAttribute — so the following syntax will be supported:
html!{
<button disabled={true}type="button" />
}
# will be almost like
::render::SimpleElement{tag_name:"button",attributes:[HtmlAttribute::from(("disabled",true),HtmlAttribute::from(("type","button"))],children:None}
Activity
Schniz commentedon Jul 8, 2020
We can have an enum type for HTML attributes (playground link), so:
and use
From<(String, String)>andFrom<(String, bool)>to generateHtmlAttribute— so the following syntax will be supported:What do you think?
vpzomtrrfrt commentedon Jul 8, 2020
That seems reasonable