How can i do add onCellEvent ?
c941010623 opened this issue · comments
Steven.Lin commented
if i use the sample code:
ASCollectionView(data: dataExample, dataID: \.self) { item, _ in
Color.blue
.overlay(Text("\(item)"))
}
.layout {
.grid(layoutMode: .adaptive(withMinItemSize: 100),
itemSpacing: 5,
lineSpacing: 5,
itemSize: .absolute(50))
}
how can i do add onCellEvent ??
Apptek Studios commented
Hi @c941010623, to add onCellEvent just use the ASSection initialiser 👍
ASCollectionView(section:
ASSection(id: 0, data: dataExample, dataID: \.self, onCellEvent: {...})
{...}
)
.layout {...}