summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-14 19:53:11 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-14 19:53:11 +0100
commit7526d73ad3f0c1480e46879159215902e241415d (patch)
treedc54121c6041df5fe817549ffd33ba8ede9a1274
parentba996f4b01103174f3134c304a83da8b4d3acf88 (diff)
downloadiced-7526d73ad3f0c1480e46879159215902e241415d.tar.gz
iced-7526d73ad3f0c1480e46879159215902e241415d.tar.bz2
iced-7526d73ad3f0c1480e46879159215902e241415d.zip
Fix `Component` not diffing when its state is recreated
-rw-r--r--widget/src/lazy/component.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/widget/src/lazy/component.rs b/widget/src/lazy/component.rs
index 30822b7d..c215de7a 100644
--- a/widget/src/lazy/component.rs
+++ b/widget/src/lazy/component.rs
@@ -266,7 +266,10 @@ where
state: tree::State::new(S::default()),
children: vec![Tree::empty()],
})));
+
*self.tree.borrow_mut() = state.clone();
+ self.diff_self();
+
tree::State::new(state)
}