Fix clear filters
This commit is contained in:
parent
579495053c
commit
936e20ac5e
@ -69,6 +69,7 @@ class FiltersController: FormViewController {
|
||||
row.value = self.filter.regions?.map(String.init).joined(separator: ",") ?? "Any"
|
||||
row.cellUpdate { cell, _ in
|
||||
cell.accessoryType = .disclosureIndicator
|
||||
row.value = self.filter.regions?.map(String.init).joined(separator: ",") ?? "Any"
|
||||
}
|
||||
}
|
||||
.onCellSelection { cell, row in
|
||||
@ -85,7 +86,7 @@ class FiltersController: FormViewController {
|
||||
form +++ Section()
|
||||
<<< ButtonRow("ClearAll") { $0.title = "Clear all filters" }.onCellSelection { cell, row in
|
||||
self.filter.clear()
|
||||
if let section = self.form.sectionBy(tag: "MainFilters") {
|
||||
for section in self.form.allSections {
|
||||
// For some reason certain cells do not redraw after first reload
|
||||
section.reload()
|
||||
section.reload()
|
||||
@ -98,13 +99,6 @@ class FiltersController: FormViewController {
|
||||
self.done = false
|
||||
}
|
||||
|
||||
// override func viewDidDisappear(_ animated: Bool) {
|
||||
// super.viewDidDisappear(animated)
|
||||
// if self.done {
|
||||
// self.onDone?()
|
||||
// }
|
||||
// }
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
if self.done {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user