Skip to content

Commit

Permalink
Still allow ref on childrenrenderer but do not use IArray for now
Browse files Browse the repository at this point in the history
Too complicated
  • Loading branch information
cecton committed Nov 1, 2023
1 parent 2401701 commit 12aa26d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/yew/src/html/component/children.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ where
/// children.map(|children| {
/// html! {
/// <div class={classes!("container")}>
/// {children.clone()}
/// {children}
/// </div>
/// }
/// })
Expand Down
7 changes: 7 additions & 0 deletions packages/yew/src/html/conversion/into_prop_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ impl IntoPropValue<VNode> for ChildrenRenderer<VNode> {
}
}

impl IntoPropValue<VNode> for &ChildrenRenderer<VNode> {
#[inline]
fn into_prop_value(self) -> VNode {
VNode::VList(Rc::new(self.clone().into()))
}
}

impl IntoPropValue<ChildrenRenderer<VNode>> for VNode {
#[inline]
fn into_prop_value(self) -> ChildrenRenderer<VNode> {
Expand Down

0 comments on commit 12aa26d

Please sign in to comment.