ra1028 / DiffableDataSources

💾 A library for backporting UITableView/UICollectionViewDiffableDataSource.
https://ra1028.github.io/DiffableDataSources
Apache License 2.0
854 stars 70 forks source link

Broken swipe actions #32

Open denis-obukhov opened 4 years ago

denis-obukhov commented 4 years ago

Checklist

Expected Behavior

trailingSwipeActionsConfigurationForRowAt is called

Current Behavior

trailingSwipeActionsConfigurationForRowAt not called

Steps to Reproduce

  1. Create table view with diffable data source
  2. Implement table view delegate's method tableView( tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath)_ )
  3. Set data source to diffable data source and delegate to self.
  4. See that it's not called

Environments

mateuszSawa commented 2 years ago

@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 } }