Skip to content

Commit 12aa26d

Browse files
committed
Still allow ref on childrenrenderer but do not use IArray for now
Too complicated
1 parent 2401701 commit 12aa26d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/yew/src/html/component/children.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ where
197197
/// children.map(|children| {
198198
/// html! {
199199
/// <div class={classes!("container")}>
200-
/// {children.clone()}
200+
/// {children}
201201
/// </div>
202202
/// }
203203
/// })

packages/yew/src/html/conversion/into_prop_value.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ impl IntoPropValue<VNode> for ChildrenRenderer<VNode> {
167167
}
168168
}
169169

170+
impl IntoPropValue<VNode> for &ChildrenRenderer<VNode> {
171+
#[inline]
172+
fn into_prop_value(self) -> VNode {
173+
VNode::VList(Rc::new(self.clone().into()))
174+
}
175+
}
176+
170177
impl IntoPropValue<ChildrenRenderer<VNode>> for VNode {
171178
#[inline]
172179
fn into_prop_value(self) -> ChildrenRenderer<VNode> {

0 commit comments

Comments
 (0)