Skip to content

Commit

Permalink
Fix Widget::layout for Component
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Sep 1, 2023
1 parent 6758de2 commit 548b9d0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion widget/src/lazy/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,14 @@ where
renderer: &Renderer,
limits: &layout::Limits,
) -> layout::Node {
let t = tree.state.downcast_mut::<Rc<RefCell<Option<Tree>>>>();

self.with_element(|element| {
element.as_widget().layout(tree, renderer, limits)
element.as_widget().layout(
&mut t.borrow_mut().as_mut().unwrap().children[0],
renderer,
limits,
)
})
}

Expand Down

0 comments on commit 548b9d0

Please sign in to comment.