Skip to content

Commit

Permalink
Merge pull request #383 from forceunwrap/change-tableview-default-clo…
Browse files Browse the repository at this point in the history
…sures

Align default closures with default behavior of the delegate methods
  • Loading branch information
mashe authored Dec 2, 2020
2 parents e4ffaaf + 9c435ef commit 9afb331
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ All notable changes to this project will be documented in this file.

#### Master

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

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

Expand Down
8 changes: 4 additions & 4 deletions Sources/RxDataSources/TableViewSectionedDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ open class TableViewSectionedDataSource<Section: SectionModelType>
configureCell: @escaping ConfigureCell,
titleForHeaderInSection: @escaping TitleForHeaderInSection = { _, _ in nil },
titleForFooterInSection: @escaping TitleForFooterInSection = { _, _ in nil },
canEditRowAtIndexPath: @escaping CanEditRowAtIndexPath = { _, _ in false },
canMoveRowAtIndexPath: @escaping CanMoveRowAtIndexPath = { _, _ in false },
canEditRowAtIndexPath: @escaping CanEditRowAtIndexPath = { _, _ in true },
canMoveRowAtIndexPath: @escaping CanMoveRowAtIndexPath = { _, _ in true },
sectionIndexTitles: @escaping SectionIndexTitles = { _ in nil },
sectionForSectionIndexTitle: @escaping SectionForSectionIndexTitle = { _, _, index in index }
) {
Expand All @@ -55,8 +55,8 @@ open class TableViewSectionedDataSource<Section: SectionModelType>
configureCell: @escaping ConfigureCell,
titleForHeaderInSection: @escaping TitleForHeaderInSection = { _, _ in nil },
titleForFooterInSection: @escaping TitleForFooterInSection = { _, _ in nil },
canEditRowAtIndexPath: @escaping CanEditRowAtIndexPath = { _, _ in false },
canMoveRowAtIndexPath: @escaping CanMoveRowAtIndexPath = { _, _ in false }
canEditRowAtIndexPath: @escaping CanEditRowAtIndexPath = { _, _ in true },
canMoveRowAtIndexPath: @escaping CanMoveRowAtIndexPath = { _, _ in true }
) {
self.configureCell = configureCell
self.titleForHeaderInSection = titleForHeaderInSection
Expand Down

0 comments on commit 9afb331

Please sign in to comment.