Revert D2590497

Reviewed By: pvulgaris

Differential Revision: D2597148

fb-gh-sync-id: a8b6e7c3a90a8a1eaefc996d6243c4a171df37c8
This commit is contained in:
Oleg Lokhvitsky 2015-10-29 14:32:47 -07:00 committed by facebook-github-bot-9
parent 70585f0724
commit 26e3bf97d3
1 changed files with 6 additions and 3 deletions

View File

@ -406,7 +406,6 @@ var ListView = React.createClass({
// component's original ref instead of clobbering it
return React.cloneElement(renderScrollComponent(props), {
ref: SCROLLVIEW_REF,
onLayout: this._setScrollVisibleLength,
}, header, bodyComponents, footer);
},
@ -425,6 +424,11 @@ var ListView = React.createClass({
logError,
this._setScrollContentLength
);
RCTUIManager.measureLayoutRelativeToParent(
React.findNodeHandle(scrollComponent),
logError,
this._setScrollVisibleLength
);
// RCTScrollViewManager.calculateChildFrames is not available on
// every platform
@ -440,8 +444,7 @@ var ListView = React.createClass({
height : width;
},
_setScrollVisibleLength: function(event) {
var {width, height} = event.nativeEvent.layout;
_setScrollVisibleLength: function(left, top, width, height) {
this.scrollProperties.visibleLength = !this.props.horizontal ?
height : width;
this._updateVisibleRows();