mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 14:40:44 +00:00
Merge pull request #109 from DioxusLabs/jk/ssr-bool-attrs
fix: ssr respects bool attrs
This commit is contained in:
commit
02d995e3f7
1 changed files with 30 additions and 0 deletions
|
@ -187,6 +187,36 @@ impl<'a> TextRenderer<'a, '_> {
|
|||
match attr.namespace {
|
||||
None => match attr.name {
|
||||
"dangerous_inner_html" => inner_html = Some(attr.value),
|
||||
"allowfullscreen"
|
||||
| "allowpaymentrequest"
|
||||
| "async"
|
||||
| "autofocus"
|
||||
| "autoplay"
|
||||
| "checked"
|
||||
| "controls"
|
||||
| "default"
|
||||
| "defer"
|
||||
| "disabled"
|
||||
| "formnovalidate"
|
||||
| "hidden"
|
||||
| "ismap"
|
||||
| "itemscope"
|
||||
| "loop"
|
||||
| "multiple"
|
||||
| "muted"
|
||||
| "nomodule"
|
||||
| "novalidate"
|
||||
| "open"
|
||||
| "playsinline"
|
||||
| "readonly"
|
||||
| "required"
|
||||
| "reversed"
|
||||
| "selected"
|
||||
| "truespeed" => {
|
||||
if attr.value != "false" {
|
||||
write!(f, " {}=\"{}\"", attr.name, attr.value)?
|
||||
}
|
||||
}
|
||||
_ => write!(f, " {}=\"{}\"", attr.name, attr.value)?,
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue