forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug with sticky headers that listen to onLayout
Summary: Wrapping them in ScrollViewStickyHeader broken the onLayout and would always give y = 0 because it is now relative to the wrapper. This uses some not-so-great react magic, but fixes the bugs with no aparent side-effects. Note we also need to kill the StaticRenderer wrapper that ListView introduces. I think this was probably a premature optimization anyway since there are usually not many headers and they are usually pretty cheap to render. If people care, they can use `shouldComponentUpdate` with the rendered components. Reviewed By: yungsters Differential Revision: D4654622 fbshipit-source-id: 1ea557ef64327d1f4df53b22fedd678da1549288
- Loading branch information
Showing
2 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters