lib/ProMotion/thirdparty/formotion_screen.rb in ProMotion-1.1.1 vs lib/ProMotion/thirdparty/formotion_screen.rb in ProMotion-1.1.2

- old
+ new

@@ -17,19 +17,24 @@ t = s.title # Formotion kills the title when you request tableView. s.tableView.allowsSelectionDuringEditing = true s.title = t - s.form.on_submit { |form| s.on_submit(form) if s.respond_to?(:on_submit) } + s.bind_submit s end + def bind_submit + self.form.on_submit { |form| self.on_submit(form) if self.respond_to?(:on_submit) } + end + # emulate the ProMotion table update for formotion def update_table_data self.form = table_data self.form.controller = self self.tableView.reloadData + self.bind_submit end def screen_setup self.title = self.class.send(:get_title) end