Skip to content

Commit 9afb331

Browse files
authored
Merge pull request #383 from forceunwrap/change-tableview-default-closures
Align default closures with default behavior of the delegate methods
2 parents e4ffaaf + 9c435ef commit 9afb331

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ All notable changes to this project will be documented in this file.
55

66
#### Master
77

8-
* Added support of mutable CellViewModels.
8+
* Adds support of mutable CellViewModels.
9+
* Changes `TableViewSectionedDataSource` default parameters `canEditRowAtIndexPath` and `canMoveRowAtIndexPath` to align with iOS default behavior #383
910

1011
## [4.0.1](https://github.com/RxSwiftCommunity/RxDataSources/releases/tag/4.0.1)
1112

Sources/RxDataSources/TableViewSectionedDataSource.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ open class TableViewSectionedDataSource<Section: SectionModelType>
3737
configureCell: @escaping ConfigureCell,
3838
titleForHeaderInSection: @escaping TitleForHeaderInSection = { _, _ in nil },
3939
titleForFooterInSection: @escaping TitleForFooterInSection = { _, _ in nil },
40-
canEditRowAtIndexPath: @escaping CanEditRowAtIndexPath = { _, _ in false },
41-
canMoveRowAtIndexPath: @escaping CanMoveRowAtIndexPath = { _, _ in false },
40+
canEditRowAtIndexPath: @escaping CanEditRowAtIndexPath = { _, _ in true },
41+
canMoveRowAtIndexPath: @escaping CanMoveRowAtIndexPath = { _, _ in true },
4242
sectionIndexTitles: @escaping SectionIndexTitles = { _ in nil },
4343
sectionForSectionIndexTitle: @escaping SectionForSectionIndexTitle = { _, _, index in index }
4444
) {
@@ -55,8 +55,8 @@ open class TableViewSectionedDataSource<Section: SectionModelType>
5555
configureCell: @escaping ConfigureCell,
5656
titleForHeaderInSection: @escaping TitleForHeaderInSection = { _, _ in nil },
5757
titleForFooterInSection: @escaping TitleForFooterInSection = { _, _ in nil },
58-
canEditRowAtIndexPath: @escaping CanEditRowAtIndexPath = { _, _ in false },
59-
canMoveRowAtIndexPath: @escaping CanMoveRowAtIndexPath = { _, _ in false }
58+
canEditRowAtIndexPath: @escaping CanEditRowAtIndexPath = { _, _ in true },
59+
canMoveRowAtIndexPath: @escaping CanMoveRowAtIndexPath = { _, _ in true }
6060
) {
6161
self.configureCell = configureCell
6262
self.titleForHeaderInSection = titleForHeaderInSection

0 commit comments

Comments
 (0)