From e3ef69548c92fddee5f48ee7f2b92bb3832677b1 Mon Sep 17 00:00:00 2001 From: David Adams Date: Sat, 4 Mar 2017 19:11:11 -0800 Subject: [PATCH] VirtualizedList - trigger this.props.onContentSizeChange Summary: Have tested this and works fine ``` this.listView = thisRef} ListFooterComponent={this.renderFooter} renderItem={this._renderRow} onScroll={this._onScroll} onContentSizeChange={this.contentSizeChanged} renderSectionHeader={this._renderSectionHeader} sections={this.props.data} /> Closes https://github.com/facebook/react-native/pull/12708 Differential Revision: D4656338 Pulled By: sahrens fbshipit-source-id: a2b585aa80247ff0dc2261b740003a6e77cb7a97 --- Libraries/CustomComponents/Lists/VirtualizedList.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/CustomComponents/Lists/VirtualizedList.js b/Libraries/CustomComponents/Lists/VirtualizedList.js index 5adb1a6fa..1eed99333 100644 --- a/Libraries/CustomComponents/Lists/VirtualizedList.js +++ b/Libraries/CustomComponents/Lists/VirtualizedList.js @@ -539,6 +539,9 @@ class VirtualizedList extends React.PureComponent { } _onContentSizeChange = (width: number, height: number) => { + if (this.props.onContentSizeChange) { + this.props.onContentSizeChange(width, height); + } this._scrollMetrics.contentLength = this._selectLength({height, width}); this._updateCellsToRenderBatcher.schedule(); };