Merge pull request #145 from clearsightstudio/table-screen-search-index-fix

Table screen search index fix
This commit is contained in:
Jamon Holmgren
2013-06-13 09:17:53 -07:00
2 changed files with 9 additions and 5 deletions

View File

@@ -10,10 +10,10 @@ module ProMotion
search_bar.placeholder = params[:search_bar][:placeholder]
end
@contacts_search_display_controller = UISearchDisplayController.alloc.initWithSearchBar(search_bar, contentsController: params[:content_controller])
@contacts_search_display_controller.delegate = params[:delegate]
@contacts_search_display_controller.searchResultsDataSource = params[:data_source]
@contacts_search_display_controller.searchResultsDelegate = params[:search_results_delegate]
@table_search_display_controller = UISearchDisplayController.alloc.initWithSearchBar(search_bar, contentsController: params[:content_controller])
@table_search_display_controller.delegate = params[:delegate]
@table_search_display_controller.searchResultsDataSource = params[:data_source]
@table_search_display_controller.searchResultsDelegate = params[:search_results_delegate]
self.table_view.tableHeaderView = search_bar
end

View File

@@ -106,7 +106,11 @@ module ProMotion
# Set table_data_index if you want the right hand index column (jumplist)
def sectionIndexTitlesForTableView(table_view)
self.table_data_index if self.respond_to?(:table_data_index)
if @promotion_table_data.filtered
nil
else
self.table_data_index if self.respond_to?(:table_data_index)
end
end
def tableView(table_view, cellForRowAtIndexPath:index_path)