forked from evetstech/react-native-settings-list
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass ref from Header and Item onto components
Currently, we cannot use refs with SettingsList.Header and SettingsList.Item because they are not true components with render methods. This commit adds itemRef and headerRef props that are passed onto the components that Item/Header get rendered into. (Frustratingly, we have to use the names itemRef/headerRef; `ref` is an illegal React prop name, so we cannot access a ref function as a prop, and because SettingsList.Header and SettingsList.Item never make it to the render stage, we cannot access the ref function through `this.refs` either.)
- Loading branch information
Ryan Eberhardt
committed
Aug 24, 2017
1 parent
ab761f1
commit 1a07b93
Showing
2 changed files
with
8 additions
and
3 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