mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
Use keyed for recipes now that we have stable keys
This commit is contained in:
parent
91902cebbe
commit
ede08f7ef6
@ -46,13 +46,14 @@ pub fn recipe_selector() -> View<G> {
|
|||||||
(View::new_fragment(
|
(View::new_fragment(
|
||||||
rows.get().iter().cloned().map(|r| {
|
rows.get().iter().cloned().map(|r| {
|
||||||
view ! {
|
view ! {
|
||||||
div(class="grid") {Indexed(IndexedProps{
|
div(class="grid") {Keyed(KeyedProps{
|
||||||
iterable: r.handle(),
|
iterable: r.handle(),
|
||||||
template: |(i, recipe)| {
|
template: |(i, recipe)| {
|
||||||
view! {
|
view! {
|
||||||
RecipeSelection(RecipeCheckBoxProps{i: i, title: create_memo(move || recipe.get().title.clone())})
|
RecipeSelection(RecipeCheckBoxProps{i: i, title: create_memo(move || recipe.get().title.clone())})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
key: |r| r.0.clone(),
|
||||||
})}
|
})}
|
||||||
}
|
}
|
||||||
}).collect()
|
}).collect()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user