Skip to content

Commit

Permalink
Support onLayout and onContentSizeChange attributes on ListView
Browse files Browse the repository at this point in the history
Summary:
Docs say they're supported and presumably they should work exactly as for ScrollView but currently they are intercepted by the ListView
Closes #4712

Reviewed By: svcscm

Differential Revision: D2745080

Pulled By: vjeux

fb-gh-sync-id: 531907f03ae46d5200003cdb335c10b40c7d3bed
  • Loading branch information
almost authored and facebook-github-bot-4 committed Dec 10, 2015
1 parent ac783a8 commit 3cfcd40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Libraries/CustomComponents/ListView/ListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ var ListView = React.createClass({
height : width;
this._updateVisibleRows();
this._renderMoreRowsIfNeeded();
if (this.props.onContentSizeChange) {
this.props.onContentSizeChange(width, height);
}
},

_onLayout: function(event) {
Expand All @@ -444,6 +447,9 @@ var ListView = React.createClass({
height : width;
this._updateVisibleRows();
this._renderMoreRowsIfNeeded();
if (this.props.onLayout) {
this.props.onLayout(event);
}
},

_setScrollVisibleLength: function(left, top, width, height) {
Expand Down

1 comment on commit 3cfcd40

@janmonschke
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Please sign in to comment.