Skip to content

Commit

Permalink
fix: handle tab case like t
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Oct 24, 2024
1 parent 2b5e57b commit 5958f3d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ui/viewport.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@ func (m ViewportViewModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
if m.page == KeysPage {
m.page = TransactionPage
return m, nil
// If there isn't a key already, select the first record
if m.keysPage.SelectedKey() == nil && m.Data != nil {
data := *m.Data.ParticipationKeys
return m, keys.EmitKeySelected(&data[0])
}
// Navigate to the transaction page
return m, keys.EmitKeySelected(m.keysPage.SelectedKey())
}
case "g":
m.generatePage.Inputs[0].SetValue(m.accountsPage.SelectedAccount().Address)
Expand Down

0 comments on commit 5958f3d

Please sign in to comment.