diff --git a/lib/ProMotion/table/data/table_data.rb b/lib/ProMotion/table/data/table_data.rb index cd8eb509..2a231632 100644 --- a/lib/ProMotion/table/data/table_data.rb +++ b/lib/ProMotion/table/data/table_data.rb @@ -59,8 +59,13 @@ def filtered? @filtered == true end + def search_string + @search_string ||= nil + end + def search(search_string) @filtered = true + @search_string = search_string self.filtered_data = [] self.data.compact.each do |section| diff --git a/lib/ProMotion/table/table.rb b/lib/ProMotion/table/table.rb index defa1c63..320a3b53 100644 --- a/lib/ProMotion/table/table.rb +++ b/lib/ProMotion/table/table.rb @@ -95,6 +95,10 @@ def searching? self.promotion_table_data.filtered? end + def search_string + self.promotion_table_data.search_string + end + def update_table_view_data(data, args = {}) self.promotion_table_data.data = data if args[:index_paths]