mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
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:
committed by
Facebook Github Bot
parent
128596b311
commit
87bdcbde6a
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user