diff --git a/Sources/BasicData/BasicDataSource.swift b/Sources/BasicData/BasicDataSource.swift index 76f01bd..6bb122d 100644 --- a/Sources/BasicData/BasicDataSource.swift +++ b/Sources/BasicData/BasicDataSource.swift @@ -34,8 +34,10 @@ public class BasicDataSource
: DataSourceType where Section: SectionType } public func moveItem(at sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { + var sections = self.sections let item = sections[sourceIndexPath.section].items[sourceIndexPath.item] sections[sourceIndexPath.section].items.remove(at: sourceIndexPath.item) sections[destinationIndexPath.section].items.insert(item, at: destinationIndexPath.item) + self.sections = sections } }