From 815b78799de22d77acd2183fa6ba69c24d3b99db Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Mon, 15 Mar 2021 11:23:56 -0300 Subject: [PATCH] fix: adjust page size to number of options --- internal/prompt/prompt.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/prompt/prompt.go b/internal/prompt/prompt.go index 53dd84590..3d42d66a5 100644 --- a/internal/prompt/prompt.go +++ b/internal/prompt/prompt.go @@ -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 {