Open
Description
Hi all,
I have declared a MutableObservableArray2D
as a property in my class which is used as a CollectionView data source. I have multiple signals which generate section data for my CollectionView data source. What is the correct way to update MutableObservableArray2D
?
I have been doing it like below in my project, but i'm starting to have weird timing issues.
let sections = MutableObservableArray2D(Array2D<String, String>(sectionsWithItems: [
("foo", []),
("bar", []),
]))
func start() {
SafeSignal<String>(just: "foo").observeNext { string in
self.sections.replaceItems(ofSectionAt: 0, with: [string], performDiff: false)
}
.dispose(in: bag)
SafeSignal<String>(just: "bar").observeNext { string in
self.sections.replaceItems(ofSectionAt: 1, with: [string], performDiff: false)
}
.dispose(in: bag)
}
Metadata
Metadata
Assignees
Labels
No labels