diff --git a/src/core/RecyclerListView.tsx b/src/core/RecyclerListView.tsx index abce8fb6..ec133b7e 100644 --- a/src/core/RecyclerListView.tsx +++ b/src/core/RecyclerListView.tsx @@ -353,6 +353,13 @@ export default class RecyclerListView

{ public abstract scrollTo(x: number, y: number, animate: boolean): void; + + //Override and return node handle to your custom scrollview. Useful if you need to use Animated Events. + public getScrollableNode(): number | null { + return null; + } } diff --git a/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx b/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx index e1f6711b..0d0dedce 100644 --- a/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx +++ b/src/platform/reactnative/scrollcomponent/ScrollComponent.tsx @@ -43,6 +43,13 @@ export default class ScrollComponent extends BaseScrollComponent { } } + public getScrollableNode(): number | null { + if (this._scrollViewRef && this._scrollViewRef.getScrollableNode) { + return this._scrollViewRef.getScrollableNode(); + } + return null; + } + public render(): JSX.Element { const Scroller = TSCast.cast(this.props.externalScrollView); //TSI const renderContentContainer = this.props.renderContentContainer ? this.props.renderContentContainer : this._defaultContainer;