From 1b2c0ded40e5801b5e6f52c5cc51500da23b8f9a Mon Sep 17 00:00:00 2001 From: lra-tapptic Date: Tue, 27 Jun 2017 14:13:01 +0200 Subject: [PATCH] Allow the use of an animated ScrollView If the renderScrollComponent props returns an , use component._component as a ref to access the ScrollView component --- InfiniteScrollView.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/InfiniteScrollView.js b/InfiniteScrollView.js index c26f716..0a7835f 100644 --- a/InfiniteScrollView.js +++ b/InfiniteScrollView.js @@ -81,7 +81,13 @@ export default class InfiniteScrollView extends React.Component { }); return cloneReferencedElement(renderScrollComponent(props), { - ref: component => { this._scrollComponent = component; }, + ref: component => { + if (component && component._component) { + this._scrollComponent = component._component; + } else { + this._scrollComponent = component; + } + }, }); }