Take the following example:
fn main() {
element! {
Button {
Text(content: "<")
#( Some(element! { Text(content: "Click me") }) )
Text(content: ">")
}
}
.print()
}
This code will print <, rather than <Click me>.
In my case, I was trying to wrap the button component to add some default styling, and adding <...> to whatever components were passed in, but I saw in the source code the button component only gets a single next child, rather than attempting to render all children.
A workaround is to put the children in a View, but I thought it was a good idea to raise this issue. :(
Take the following example:
This code will print
<, rather than<Click me>.In my case, I was trying to wrap the button component to add some default styling, and adding
<...>to whatever components were passed in, but I saw in the source code the button component only gets a single next child, rather than attempting to render all children.A workaround is to put the children in a
View, but I thought it was a good idea to raise this issue. :(