如何在选择字段(琥珀色框架)中添加默认空白值?
== select_field(名称:“ parent_category_id”,集合:Category.all.map {| category | [category.id,category.name]},已选择:“”,类:“ form-control”)>
答案 0 :(得分:0)
利用可以连接晶体阵列的事实:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
DispatchQueue.main.async {
self.searchController.searchBar.becomeFirstResponder()
}
}