Skip to content

Commit 89249ad

Browse files
committed
fix: keep selection on group collapse so Ctrl+L can re-expand
1 parent 3bdfbd0 commit 89249ad

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

TablePro/Views/Connection/WelcomeWindowView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,8 @@ struct WelcomeWindowView: View {
647647
!collapsedGroupIds.contains(groupId) else { return }
648648
withAnimation(.easeInOut(duration: 0.2)) {
649649
collapsedGroupIds.insert(groupId)
650-
selectedConnectionId = nil
650+
// Keep selectedConnectionId so Ctrl+L can derive the groupId to expand.
651+
// The List won't show a highlight for the hidden row.
651652
UserDefaults.standard.set(
652653
Array(collapsedGroupIds.map(\.uuidString)),
653654
forKey: "com.TablePro.collapsedGroupIds"

docs/features/keyboard-shortcuts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ TablePro is keyboard-driven. Most actions have shortcuts, and most menu shortcut
177177
| Explain with AI | `Cmd+L` | Send selected SQL (or current query) to AI for explanation |
178178
| Optimize with AI | `Cmd+Option+L` | Send selected SQL (or current query) to AI for optimization |
179179

180-
## Alternative Navigation (Ctrl+HJKL)
180+
## Alternative navigation (Ctrl+HJKL)
181181

182182
For keyboards without dedicated arrow keys (e.g., HHKB), Ctrl+HJKL works as arrow key alternatives throughout the app. These work alongside arrow keys, not as replacements.
183183

docs/vi/features/keyboard-shortcuts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ TablePro thiên về bàn phím. Hầu hết thao tác đều có phím tắt, v
177177
| Giải thích với AI | `Cmd+L` | Gửi SQL đã chọn (hoặc query hiện tại) cho AI giải thích |
178178
| Tối ưu với AI | `Cmd+Option+L` | Gửi SQL đã chọn (hoặc query hiện tại) cho AI tối ưu |
179179

180-
## Điều Hướng Thay Thế (Ctrl+HJKL)
180+
## Điều hướng thay thế (Ctrl+HJKL)
181181

182182
Dành cho bàn phím không có phím mũi tên riêng (ví dụ: HHKB), Ctrl+HJKL hoạt động như phím mũi tên thay thế trong toàn bộ ứng dụng. Các phím này hoạt động song song với phím mũi tên.
183183

0 commit comments

Comments
 (0)