DiffableDataSources
DiffableDataSources copied to clipboard
Broken swipe actions
Checklist
- [x ] This is not a Apple's bug.
- [x ] Reviewed the README and documents.
- [x ] Searched existing issues for ensure not duplicated.
Expected Behavior
trailingSwipeActionsConfigurationForRowAt is called
Current Behavior
trailingSwipeActionsConfigurationForRowAt not called
Steps to Reproduce
- Create table view with diffable data source
- Implement table view delegate's method tableView( tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath)_ )
- Set data source to diffable data source and delegate to self.
- See that it's not called
Environments
- version: 0.4.0
- Swift version: 5.2
- iOS version: 14.2
- Xcode version: 12.2
- Devices/Simulators: iPhone 7/iPhone 11 Pro
- CocoaPods/Carthage version: 0.4.0
@denis-obukhov quick fix for it:
class SwipeTableViewDiffableDataSource<SectionIdentifierType: Hashable, ItemIdentifierType: Hashable>: TableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType> { override func tableView(_ tableView: UITableView, canEditRowAt: IndexPath) -> Bool { return true } }