lib/ProMotion/table/data/table_data.rb in ProMotion-2.1.0 vs lib/ProMotion/table/data/table_data.rb in ProMotion-2.2.0
- old
+ new
@@ -33,9 +33,13 @@
params = index_path_to_section_index(params)
table_section = self.section(params[:section])
table_section[:cells].delete_at(params[:index].to_i)
end
+ def move_cell(from, to)
+ section(to.section)[:cells].insert(to.row, section(from.section)[:cells].delete_at(from.row))
+ end
+
def search(search_string)
start_searching(search_string)
self.data.compact.each do |section|
new_section = {}