Skip to content

Commit

Permalink
add update to child_id (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmoulton committed May 30, 2024
1 parent f91ce6f commit 5255ee1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/views/dyn_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ impl<T: 'static> View for DynamicContainer<T> {
let old_child_scope = self.child_scope;
let old_child_id = self.child_id;
let (new_child, new_child_scope) = (self.child_fn)(*val);
self.child_id = new_child.id();
self.id.set_children(vec![new_child]);
self.child_scope = new_child_scope;
cx.app_state_mut().remove_view(old_child_id);
Expand Down

0 comments on commit 5255ee1

Please sign in to comment.