Search for everything when user taps "search" on keyboard (IOS-141)
This commit is contained in:
parent
5370d00504
commit
5c71b7ef45
|
@ -34,6 +34,7 @@ class SearchResultsOverviewTableViewController: UIViewController, NeedsDependenc
|
|||
self.coordinator = sceneCoordinator
|
||||
|
||||
tableView = UITableView(frame: .zero, style: .insetGrouped)
|
||||
tableView.keyboardDismissMode = .onDrag
|
||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||
tableView.backgroundColor = .systemGroupedBackground
|
||||
tableView.separatorInset.left = 62
|
||||
|
|
|
@ -265,7 +265,12 @@ extension SearchDetailViewController: UISearchBarDelegate {
|
|||
}
|
||||
|
||||
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
|
||||
guard let searchText = searchBar.text, searchText.isNotEmpty else { return }
|
||||
|
||||
searchBar.resignFirstResponder()
|
||||
|
||||
let searchResultViewModel = SearchResultViewModel(context: context, authContext: viewModel.authContext, searchScope: .all, searchText: searchText)
|
||||
coordinator.present(scene: .searchResult(viewModel: searchResultViewModel), transition: .show)
|
||||
}
|
||||
|
||||
func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
|
||||
|
|
Loading…
Reference in New Issue