mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
This commit is contained in:
@@ -709,7 +709,7 @@ where
|
||||
|
||||
buf.push('<');
|
||||
buf.push_str(E::TAG);
|
||||
<At as ToTemplate>::to_template(
|
||||
<At as ToTemplate>::to_template_attribute(
|
||||
buf,
|
||||
&mut class,
|
||||
&mut style,
|
||||
|
||||
@@ -437,6 +437,17 @@ pub trait ToTemplate {
|
||||
inner_html: &mut String,
|
||||
position: &mut Position,
|
||||
);
|
||||
|
||||
/// Renders a view type to a template in attribute position.
|
||||
fn to_template_attribute(
|
||||
buf: &mut String,
|
||||
class: &mut String,
|
||||
style: &mut String,
|
||||
inner_html: &mut String,
|
||||
position: &mut Position,
|
||||
) {
|
||||
Self::to_template(buf, class, style, inner_html, position);
|
||||
}
|
||||
}
|
||||
|
||||
/// Keeps track of what position the item currently being hydrated is in, relative to its siblings
|
||||
|
||||
@@ -103,6 +103,15 @@ impl ToTemplate for () {
|
||||
) {
|
||||
buf.push_str("<!>");
|
||||
}
|
||||
|
||||
fn to_template_attribute(
|
||||
_buf: &mut String,
|
||||
_class: &mut String,
|
||||
_style: &mut String,
|
||||
_inner_html: &mut String,
|
||||
_position: &mut Position,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
impl<A: Render> Render for (A,) {
|
||||
|
||||
Reference in New Issue
Block a user