[ReactNative] Fix manual ListView loading

Summary:
@public

If something changes in the list view that should trigger more loads, it
wouldn't.  Example case is tap to load more - only the first new row would load,
but it wouldn't trigger a re-measure and subsequent layout of additional new
rows.

Test Plan: View More in Events works.
This commit is contained in:
Spencer Ahrens 2015-06-22 13:37:25 -07:00
parent 3d6ffcf903
commit 5b476d0e41
1 changed files with 4 additions and 1 deletions

View File

@ -275,6 +275,10 @@ var ListView = React.createClass({
}
},
componentDidUpdate: function() {
this._measureAndUpdateScrollProps();
},
onRowHighlighted: function(sectionID, rowID) {
this.setState({highlightedRow: {sectionID, rowID}});
},
@ -368,7 +372,6 @@ var ListView = React.createClass({
if (!props.scrollEventThrottle) {
props.scrollEventThrottle = DEFAULT_SCROLL_CALLBACK_THROTTLE;
}
return (
<ScrollView {...props}
ref={SCROLLVIEW_REF}>