Deselect row and close detail drawer when clicking selected row (#18)
Toggle selection off when tapping an already-selected row in both
LogTableView and LiveTailView, which also closes the right detail
drawer since its visibility is driven by the selection state.
https://claude.ai/code/session_01YabtJsLoZcgCGBdeaKjXFL
Co-authored-by: Claude <noreply@anthropic.com>
commitf7e6812cacf082dabe7b791f13b104b52a19677a
authoriko <mail@iko.soy>
dateSun 15 Feb 2026, 16:26 (8 months ago)
parente4dc5e8
ParseableViewer/Views/LiveTailView.swift+5−1
@@ -289,7 +289,11 @@ struct LiveTailView: View {
289289 )
290290 .id(sorted[index].id)
291291 .onTapGesture {
292− selectedRecord = sorted[index].record
292+ if selectedRecord == sorted[index].record {
293+ selectedRecord = nil
294+ } else {
295+ selectedRecord = sorted[index].record
296+ }
293297 }
294298 }
295299 } header: {
ParseableViewer/Views/LogTableView.swift+7−2
@@ -87,8 +87,13 @@ struct LogTableView: View {
8787 onCellFilter: onCellFilter
8888 )
8989 .onTapGesture {
90− selectedIndex = index
91− selectedRecord = cachedSorted[index]
90+ if selectedIndex == index {
91+ selectedIndex = nil
92+ selectedRecord = nil
93+ } else {
94+ selectedIndex = index
95+ selectedRecord = cachedSorted[index]
96+ }
9297 }
9398 }
9499 } header: {