diff --git a/lib/ProMotion/screens/_tables/_table.rb b/lib/ProMotion/screens/_tables/_table.rb index afee3e0..08b9166 100644 --- a/lib/ProMotion/screens/_tables/_table.rb +++ b/lib/ProMotion/screens/_tables/_table.rb @@ -139,6 +139,17 @@ module ProMotion end end + def tableView(tableView, sectionForSectionIndexTitle:title, atIndex:index) + return index unless ["{search}", UITableViewIndexSearch].include?(self.table_data_index[0]) + + if index == 0 + tableView.setContentOffset(CGPointZero, animated:false) + NSNotFound + else + index-1 + end + end + def deleteRowsAtIndexPaths(indexPaths, withRowAnimation:animation) PM.logger.warn "ProMotion expects you to use 'delete_cell(index_paths, animation)'' instead of 'deleteRowsAtIndexPaths(indexPaths, withRowAnimation:animation)'." delete_cell(indexPaths, animation)