I am using FirebaseUI for Swift and am showing items in a TableView at the following manner:
let query = Database.database().reference().child("promotions").queryOrdered(byChild: "place_id").queryEqual(toValue: AccountManager.getPlaceId()!)
dataSource = tableView.bind(to: query) { (tableView, indexPath, snap) -> UITableViewCell in
let cell = tableView.dequeueReusableCell(withIdentifier: "cellReuseIdentifier") as! PromotionTableViewCell
let title = (snap.value as? NSDictionary)?["title"] as? String
cell.promotionNameLabel.text? = title ?? ""
return cell
}
This works just great! But now, I want to filter items based on user search in text field. Is that even possible, to filter out specific items of the list?
I'd like to have a solution for this. Anybody got a solution?