Skip to content

Commit 4317e70

Browse files
committed
Adds setItem.
1 parent d0c400e commit 4317e70

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/DataSources/TableViewSectionedDataSource.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ public class RxTableViewSectionedDataSource<S: SectionModelType>
128128
return self._sectionModels[indexPath.section].items[indexPath.item]
129129
}
130130

131+
public func setItem(item item: I, indexPath: NSIndexPath) {
132+
var section = self._sectionModels[indexPath.section]
133+
section.items[indexPath.item] = item
134+
self._sectionModels[indexPath.section] = section
135+
}
136+
131137
public func modelAtIndexPath(indexPath: NSIndexPath) throws -> Any {
132138
return itemAtIndexPath(indexPath)
133139
}

0 commit comments

Comments
 (0)