-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Description
Step 2: Describe your environment
- Objective C or Swift: Swift
- iOS version: 12.2
- Firebase SDK version: 5.20.2
- FirebaseUI version: 6.2.1
- CocoaPods Version: 1.6.1
Step 3: Describe the problem:
I'm binding a Firestore query to my UITableView as follows:
let query = userChannelsReference.order(by: "field1", descending: true)
dataSource = tableView.bind(toFirestoreQuery: query) { tableView, indexPath, snapshot in
let cell = tableView.dequeueReusableCell(withIdentifier: "ChannelCell", for: indexPath)
cell.textLabel?.text = snapshot.get("field2") as? String
return cell
}
- When I update just
field2
in a document,populateCell
is called and the corresponding cell's text is appropriately updated. - When I update both
field1
andfield2
in a document so that thefield1
update doesn't change the order of cells,populateCell
is called and the corresponding cell's text is appropriately updated. - When I update both
field1
andfield2
in a document so that thefield1
update changes the order of cells, the cells get reordered butpopulateCell
is not called. The cell's text gets stuck displaying the oldfield2
value.
Steps to reproduce:
- Bind UITableView to an ordered Firebase query like shown above.
- Run an update on a document that changes both
field1
andfield2
and that causes the cells to be reordered.
Observed Results:
- The UITableView cells get reordered but
populateCell
does not get called.
Expected Results:
- The UITableView cells get reordered and
populateCell
does get called.
Metadata
Metadata
Assignees
Labels
No labels