RxDataSources icon indicating copy to clipboard operation
RxDataSources copied to clipboard

tableview reload section or rows

Open YuriiPetrov opened this issue 6 years ago • 2 comments

Hi. How I can to do "tableview reload section or rows"? I changed a property for item value in my array, but I don't understand how I can to reload row.

YuriiPetrov avatar Feb 19 '19 22:02 YuriiPetrov

You shouldn't need to reload anything, that's how the binding works. Can you either paste the code here or provide some full example on your setup?

mkko avatar Mar 07 '19 17:03 mkko

I had a similar problem!!!

  code:
    let days: Driver<[SectionModel<String, DateModel>]>
    ....

    let ds = RxCollectionViewSectionedReloadDataSource<SectionModel<String, DateModel>> (configureCell: { (ds, collectionView, indexPath, model) -> DayCell in
           let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCellIdentifire, for: indexPath) as! DayCell
        
          cell.model = model
        
          return cell
      })
    
       vmOutput.days
        .asDriver()
        .drive(collectionView.rx.items(dataSource: ds))
        .disposed(by: rx.disposeBag)

StephentTom avatar Aug 09 '19 08:08 StephentTom