From 8d7b419ed72ec5a628946ec2ddaff331b1fcc36b Mon Sep 17 00:00:00 2001 From: Dilan Edirisinghe Date: Thu, 17 Mar 2016 12:10:35 -0700 Subject: [PATCH] Add missing conditional to ListView. Reviewed By: jingc Differential Revision: D3062338 fb-gh-sync-id: 52f9477604f488b7bc4829046f166c8e30aef868 shipit-source-id: 52f9477604f488b7bc4829046f166c8e30aef868 --- Libraries/CustomComponents/ListView/ListView.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Libraries/CustomComponents/ListView/ListView.js b/Libraries/CustomComponents/ListView/ListView.js index ae18efd69..314bd616e 100644 --- a/Libraries/CustomComponents/ListView/ListView.js +++ b/Libraries/CustomComponents/ListView/ListView.js @@ -1,5 +1,10 @@ /** - * Copyright (c) 2015, Facebook, Inc. All rights reserved. + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * Facebook, Inc. ("Facebook") owns all right, title and interest, including * all intellectual property and other proprietary rights, in and to the React @@ -527,7 +532,7 @@ var ListView = React.createClass({ this.setState((state, props) => { var rowsToRender = Math.min( state.curRenderedRowsCount + props.pageSize, - props.dataSource.getRowAndSectionCount() + (props.enableEmptySections ? props.dataSource.getRowAndSectionCount() : props.dataSource.getRowCount()) ); this._prevRenderedRowsCount = state.curRenderedRowsCount; return {