We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 863f174 commit 8242f53Copy full SHA for 8242f53
1 file changed
examples/nested_list/src/list.rs
@@ -57,7 +57,7 @@ impl Component for List {
57
<div class={classes!("list", inactive)}>
58
{ &ctx.props().header }
59
<div class="items">
60
- { Self::view_items(ctx.props().children.clone()) }
+ { Self::view_items(&ctx.props().children) }
61
</div>
62
63
@@ -66,8 +66,9 @@ impl Component for List {
66
}
67
68
impl List {
69
- fn view_items(children: IArray<VChild<ListItem>>) -> Html {
+ fn view_items(children: impl AsRef<IArray<VChild<ListItem>>>) -> Html {
70
children
71
+ .as_ref()
72
.iter()
73
.filter(|c| !c.props.hide)
74
.enumerate()
0 commit comments