Closed SirAlador closed 1 year ago
Problem The dynamic tag <@{"input"} /> renders as <textarea> in the actual DOM.
<@{"input"} />
<textarea>
Code for dynamic tag <@{"input"} />
Code for literal tag <input />
<input />
Steps To Reproduce Steps to reproduce the behavior:
cargo new yew_input_test
Setup the project with the following files:
name = "yew_input_test" version = "0.1.0" edition = "2021"
[dependencies] yew = { version = "0.20.0", features = ["csr"] }
- index.html: ```html <!DOCTYPE html> <html> <head> <style> input { background-color: green; } textarea { background-color: red; } </style> </head> <body> </body> </html>
use yew::prelude::*;
fn main() { yew::Renderer::::new().render(); }
fn root() -> Html { html! {
} }
trunk serve
Expected behavior Both input elements are rendered as input elements.
Environment:
Questionnaire
Since you have figured out where the issue is, would you mind filing a PR to fix it?
Sure! I'll get that taken care of this weekend.
Hi, I've run into the same problem. Please help review the PR.
Problem The dynamic tag
<@{"input"} />
renders as<textarea>
in the actual DOM.Code for dynamic tag
<@{"input"} />
Code for literal tag
<input />
Steps To Reproduce Steps to reproduce the behavior:
cargo new yew_input_test
Setup the project with the following files:
[dependencies] yew = { version = "0.20.0", features = ["csr"] }
fn main() { yew::Renderer::::new().render();
}
[function_component(Root)]
fn root() -> Html { html! {
{"Also input (but not): "} <@{"input"} />
} }
trunk serve
Expected behavior Both input elements are rendered as input elements.
Environment:
Questionnaire