Skip to content

A native macOS / windows / Linux database IDE built with Swift and AppKit. Connect to PostgreSQL, MySQL, SQLite, and Redis from a single app with a fast, keyboard-driven interface.

C++

fix(redis): clear stale detail editor on flat grid activation

Tobi9b98ba3aef86
diff --git a/macos/Presentation/Views/DataGrid/DataGridView.swift b/macos/Presentation/Views/DataGrid/DataGridView.swift
index e8e24eb..d778f7b 100644
--- a/macos/Presentation/Views/DataGrid/DataGridView.swift
+++ b/macos/Presentation/Views/DataGrid/DataGridView.swift
@@ -487,6 +487,12 @@ final class DataGridViewState: ObservableObject {
}
func bindRedisContext(_ context: AppState.RedisTabContext) {
+ // Redis's flat key grid never owns an editable Details callback. Clear
+ // any SQL grid selection even when this cached grid is rebound to the
+ // same context (for example when reopening its existing tab).
+ appState?.selectedRowDetails = nil
+ appState?.onDetailFieldEdit = nil
+
guard redisContext != context else { return }
redisRequestCoordinator.invalidate()
@@ -515,8 +521,6 @@ final class DataGridViewState: ObservableObject {
commitError = nil
showCommitPreview = false
isCommitting = false
- appState?.selectedRowDetails = nil
- appState?.onDetailFieldEdit = nil
}
func performRedisLoad(