Skip to content

Commit

Permalink
chore: focus first visible SVM when secrets change
Browse files Browse the repository at this point in the history
Previously, if there was a filter applied that hid the first SVM, we
would incorrectly focus that hidden secret, which would prevent the
ability to select secrets.
  • Loading branch information
apazzolini committed Aug 16, 2023
1 parent 1f047a0 commit 5c2922c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/tui/gui/cmp_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ func (self *SecretsComponent) createSVMs() error {
}
}

if len(self.secretVMs) > 0 {
self.activeSVM = self.secretVMs[0]
visibleSVMs := self.visibleSVMs()
if len(visibleSVMs) > 0 {
self.activeSVM = visibleSVMs[0]
}

curViewName := self.gui.g.CurrentView().Name()
Expand Down

0 comments on commit 5c2922c

Please sign in to comment.