Skip to content

Commit f33ac86

Browse files
ampagenttmm
andcommitted
fix(zbugs-swift): keep the UIKit list's highlight when it appears
UITableViewController clears its table's selection as the view appears, which on an iPad is after the root view set it. Amp-Thread-ID: https://ampcode.com/threads/T-c513a037-a257-45e0-b9a9-15c15edfe859 Co-authored-by: tmm <tmm@tmm.dev>
1 parent f7c1726 commit f33ac86

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎apps/zbugs-swift/Sources/ZBugsUI/IssueTable.swift‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
override func viewDidLoad() {
1818
super.viewDidLoad()
19+
// It would clear the highlight `select` sets before the list appears.
20+
clearsSelectionOnViewWillAppear = false
1921
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "issue")
2022
dataSource = UITableViewDiffableDataSource(tableView: tableView) {
2123
[unowned self] tableView, indexPath, id in

0 commit comments

Comments
 (0)