Method: Formotion::RowType::Base#on_delete
- Defined in:
- lib/formotion/row_type/base.rb
#on_delete(tableView, tableViewDelegate) ⇒ Object
called when the delete editing style was triggered tableView:commitEditingStyle:forRowAtIndexPath:
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/formotion/row_type/base.rb', line 80 def on_delete(tableView, tableViewDelegate) if row.on_delete_callback row.on_delete_callback.call(self.row) end if row.remove_on_delete? row.section.rows.delete_at(row.index) row.section.refresh_row_indexes delete_row after_delete else row.value = nil self.tableView.reloadData end end |