 
     func updateSearchResults(for searchController: UISearchController) {
         searchForText(searchController.searchBar.text)
-        if filteredObjects.isNonEmpty {
-            viewRealm.tableView.reloadData()
-        }
     }
 
     private func searchForText(_ searchText: String?) {
         guard let searchText = searchText,
-        searchText.isNonEmpty,
-        let objects = objects else { return }
-        filteredObjects = objects.filter({ isIncluded(for: searchText, concerning: $0) })
-    }
-
-    private func isIncluded(for searchText: String, concerning object: Object) -> Bool {
-        return object.objectSchema.properties
+            searchText.isNonEmpty,
+            let objects = objects else { return }
+        filteredObjects = objects.filter { self.isIncluded(for: searchText, concerning: $0) }
+    }
+
+    private func isIncluded(for searchText: String, concerning object: DynamicObject) -> Bool {
+        let isIncluded = object.objectSchema.properties
             .filter({ "\($0.name.lowercased()) \(String(describing: object[$0.name]).lowercased()))"
-            .contains(searchText.lowercased()) }).isNonEmpty
+                .contains(searchText.lowercased()) }).isNonEmpty
+        return isIncluded
     }
 
     func searchBar(_ searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) {


final class RBSRealmObjectsBrowser: UIViewController, UIViewControllerPreviewingDelegate {
    private var objects: Results<DynamicObject>?
    private var properties: [Property] = []
    private var filteredProperties: [Property] = []
    private var filteredObjects: [Object] = []
    private var isEditMode: Bool = false
    private var selectAll: Bool = false
    private var selectedObjects: [Object] = []

    private lazy var viewRealm: RBSRealmBrowserView = {
        let view = RBSRealmBrowserView()

    }

    func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
        filteredObjects = nil
    }

    func willPresentSearchController(_ searchController: UISearchController) {
