0

Basically, need to query from a different level of Firebase data tree like below.
0--data00
|-1-data10
|-data11
|-2-dat20

child node can be data or next level node, so have to use one query path per level, but want to display and update all in one tableview as
data00
data10
data11
data20

so far I only find 1 query to 1 tableview binding

self.dataSource = self.tableView.bind(to: query) { tableView, indexPath, snapshot in
let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath)
/* populate cell */
return cell
}

I did try loop thru an array of query and bind, but only the last query data is displayed on the tableview

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
richluo
  • 21
  • 5

1 Answers1

0

FirebaseUI data sources only support a single source per view.

You could try to build this yourself using the code of the existing data sources as inspiration. It might be more feasible for your specific use-case than it has proven as a generic solution in FirebaseUI itself.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • which specific adapter are you referring to? I did that on Android version FirebaseRecyclerAdapter, but not sure what is the one in IOS. – richluo Jan 17 '18 at 14:59
  • Sorry, I typed adapter out of habit there. On iOS, you'll want to look at `FUITableViewDataSource` or `FUICollectionViewDataSource`. Both lean heavily on `FUIArray`, which is a synchronized "array" backed by a Firebase reference or query. – Frank van Puffelen Jan 17 '18 at 15:55