Skip to content

Commit e23c825

Browse files
author
Alex Little
committed
Adds index path
1 parent 603e0f3 commit e23c825

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/CombineDataSources/CollectionView/CollectionViewItemsController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class CollectionViewItemsController<CollectionType>: NSObject, UICollecti
1818

1919
public typealias Element = CollectionType.Element.Element
2020
public typealias CellFactory<Element: Equatable> = (CollectionViewItemsController<CollectionType>, UICollectionView, IndexPath, Element) -> UICollectionViewCell
21-
public typealias SupplementaryViewFactory = (CollectionViewItemsController<CollectionType>, UICollectionView, String, CollectionType.Element) -> UICollectionReusableView
21+
public typealias SupplementaryViewFactory = (CollectionViewItemsController<CollectionType>, UICollectionView, String, IndexPath, CollectionType.Element) -> UICollectionReusableView
2222
public typealias CellConfig<Element, Cell> = (Cell, IndexPath, Element) -> Void
2323

2424
private let cellFactory: CellFactory<Element>
@@ -102,7 +102,7 @@ public class CollectionViewItemsController<CollectionType>: NSObject, UICollecti
102102
}
103103

104104
public func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
105-
return configureSupplementaryView!(self, collectionView, kind, collection[indexPath.section])
105+
return configureSupplementaryView!(self, collectionView, kind, indexPath, collection[indexPath.section])
106106
}
107107

108108
// MARK: - Fallback data source object

0 commit comments

Comments
 (0)