         } else {
             performSegue(withIdentifier: .showPreviousDetail, sender: indexPath)
         }
+    }
+    
+    override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
+        guard !searchController.isActive else { return false }
+        return true
     }
     
     override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {

    // MARK: Table View Methods
    
    override func numberOfSections(in tableView: UITableView) -> Int {
        return classes.count
    }
    
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return classes[section].count
    }
    
    override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return classes[section].count > 0 ? 44 : 0
    }
    

    // Empty State Delegate
    
    func emptyStateViewWillShow(view: UIView) {
        // Hide the search controller
        if #available(iOS 11.0, *) {
            navigationItem.hidesSearchBarWhenScrolling = true
            searchController.isActive = false
        } else {
            searchController.isActive = false
            // Remove from table view header
            tableView.tableHeaderView = nil
        }
    }
    
    func emptyStateViewWillHide(view: UIView) {
        // Re add the search controller
        if #available(iOS 11.0, *) {
            // Nothing to do here
        } else {
            if tableView.tableHeaderView == nil {
                tableView.tableHeaderView = searchController.searchBar
            }
        }
    }
    
    func emptyStatebuttonWasTapped(button: UIButton) {
