lib/ProMotion/table/data/table_data.rb in ProMotion-2.0.1 vs lib/ProMotion/table/data/table_data.rb in ProMotion-2.1.0.beta1
- old
+ new
@@ -22,11 +22,11 @@
section(index)[:cells].length
end
def cell(params={})
params = index_path_to_section_index(params)
- table_section = self.section(params[:section])
+ table_section = params[:unfiltered] ? self.data[params[:section]] : self.section(params[:section])
c = table_section[:cells].at(params[:index].to_i)
set_data_cell_defaults c
end
def delete_cell(params={})
@@ -65,9 +65,10 @@
data_cell[:cell_style] ||= begin
data_cell[:subtitle] ? UITableViewCellStyleSubtitle : UITableViewCellStyleDefault
end
data_cell[:cell_class] ||= PM::TableViewCell
data_cell[:cell_identifier] ||= build_cell_identifier(data_cell)
+ data_cell[:properties] ||= data_cell[:style] || data_cell[:styles]
data_cell[:accessory] = {
view: data_cell[:accessory],
value: data_cell[:accessory_value],
action: data_cell[:accessory_action],