Skip to content

Commit 931714b

Browse files
committed
Merge branch 'master' of github.com:nativescript-community/nativescript-collectionview
# Conflicts: # yarn.lock
2 parents e455c36 + c4ffb60 commit 931714b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

demo-snippets/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"@nativescript-community/ui-collectionview": "*",
77
"@nativescript-community/ui-collectionview-alignedflowlayout": "*",
88
"@nativescript-community/ui-collectionview-swipemenu": "*",
9-
"@nativescript-community/ui-collectionview-waterfall": "*"
9+
"@nativescript-community/ui-collectionview-waterfall": "*",
10+
"@nativescript-community/ui-pulltorefresh": "*"
1011
}
1112
}

src/collectionview/index.ios.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,10 @@ export class CollectionView extends CollectionViewBase {
679679
if (!view) {
680680
return -1;
681681
}
682-
return view.indexPathsForVisibleItems?.objectAtIndex(0)?.row ?? -1;
682+
const indexes = Array.from<NSIndexPath>(view.indexPathsForVisibleItems)
683+
.map((e) => e.row)
684+
.sort();
685+
return indexes[0] ?? -1;
683686
}
684687
@profile
685688
public refresh() {

0 commit comments

Comments
 (0)