Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Libraries/Components/ListView/ListViewDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,14 @@ class ListViewDataSource {
}

/**
* Returns an array containing the number of rows in each section
* Returns a mapping from sectionIDs to the number of rows in each respective
* section
*/
getSectionLengths(): Array<number> {
var results = [];
getSectionLengths(): {[key: string], number} {
var results = {};
for (var ii = 0; ii < this.sectionIdentities.length; ii++) {
results.push(this.rowIdentities[ii].length);
var sectionID = this.sectionIdentities[ii];
results[sectionID] = this.rowIdentities[ii].length;
}
return results;
}
Expand Down