Skip to content

Commit

Permalink
Clear related panes too on Ctrl+L
Browse files Browse the repository at this point in the history
  • Loading branch information
ymtdzzz committed Dec 21, 2024
1 parent aa884af commit c835536
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tuiexporter/internal/tui/component/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func (p *TUIPages) createTracePage(store *telemetry.Store) *tview.Flex {
table.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
if event.Key() == tcell.KeyCtrlL {
store.Flush()
details.Clear()
return nil
} else if event.Key() == tcell.KeyCtrlS {
if sortType == telemetry.SORT_TYPE_NONE {
Expand Down Expand Up @@ -425,6 +426,8 @@ func (p *TUIPages) createMetricsPage(store *telemetry.Store) *tview.Flex {
table.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
if event.Key() == tcell.KeyCtrlL {
store.Flush()
details.Clear()
chart.Clear()
return nil
}
return event
Expand Down Expand Up @@ -575,6 +578,8 @@ func (p *TUIPages) createLogPage(store *telemetry.Store) *tview.Flex {
table.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
if event.Key() == tcell.KeyCtrlL {
store.Flush()
details.Clear()
body.Clear()
return nil
}

Expand Down

0 comments on commit c835536

Please sign in to comment.