propagate getScrollResponder, getScrollableNode

Summary:
so users can call `setNativeProps` and do more compositing.

**Test Plan:**

Added this to `onPress` of `SectionListExample` and `FlatListExample`:

    this._listRef.getNode().getScrollResponder().setNativeProps({scrollEnabled: false});

and saw scroll get disabled. Note the call to `getNode` because we are using the `Animated.createComponent` wrapper.

Reviewed By: achen1, bvaughn

Differential Revision: D4821711

fbshipit-source-id: 8d1f3dd7ccc646524f154721c5c7036620d57132
This commit is contained in:
Spencer Ahrens
2017-04-03 18:36:31 -07:00
committed by Facebook Github Bot
parent 128596b311
commit 87bdcbde6a
5 changed files with 63 additions and 6 deletions

View File

@@ -67,6 +67,9 @@ class MetroListView extends React.Component {
this.props.horizontal ? {x: offset, animated} : {y: offset, animated}
);
}
getListRef() {
return this._listRef;
}
static defaultProps: DefaultProps = {
keyExtractor: (item, index) => item.key || index,
renderScrollComponent: (props: Props) => {