Skip to content

Commit

Permalink
remove rebuild of component overlay from on_event
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksenger committed May 13, 2022
1 parent 296e157 commit ea389ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 1 addition & 3 deletions lazy/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,7 @@ where
Some(
CacheBuilder {
element: state.view(),
overlay_builder: |element| {
element.overlay(layout, renderer)
},
overlay_builder: |_| None,
}
.build(),
)
Expand Down
11 changes: 1 addition & 10 deletions lazy/src/pure/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,7 @@ where
instance_ref_builder: |instance| instance.state.borrow(),
tree: overlay.tree,
types: PhantomData,
overlay_builder: |instance, tree| {
instance
.as_ref()
.unwrap()
.borrow_element()
.as_ref()
.unwrap()
.as_widget()
.overlay(&mut tree.children[0], layout, renderer)
},
overlay_builder: |_, _| None,
}
.build(),
);
Expand Down

0 comments on commit ea389ac

Please sign in to comment.