diff --git a/src/widgets/switcher.rs b/src/widgets/switcher.rs index 17ac2ee..422e1b6 100644 --- a/src/widgets/switcher.rs +++ b/src/widgets/switcher.rs @@ -55,7 +55,7 @@ impl WrapperWidget for Switcher { context: &mut LayoutContext<'_, '_, '_, '_, '_>, ) -> Size { if self.source.has_updated() { - self.child.unmount_in(context); + self.child = WidgetRef::new(self.source.get()); } context.invalidate_when_changed(&self.source); available_space