Skip to content

Commit

Permalink
Merge pull request #164 from auth0/fix-select-page-size
Browse files Browse the repository at this point in the history
fix: extend select page size to the actual number of options
  • Loading branch information
Widcket authored Mar 15, 2021
2 parents 7de6fa3 + 815b787 commit eeeee50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/prompt/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ func BoolInput(name string, message string, help string, required bool) *survey.
}

func SelectInput(name string, message string, help string, options []string, required bool) *survey.Question {
// force options "page" size to full,
// since there's not visual clue about extra options.
pageSize := len(options)
input := &survey.Question{
Name: name,
Prompt: &survey.Select{Message: message, Help: help, Options: options},
Prompt: &survey.Select{Message: message, Help: help, Options: options, PageSize: pageSize},
}

if required {
Expand Down

0 comments on commit eeeee50

Please sign in to comment.