-
Notifications
You must be signed in to change notification settings - Fork 219
Description
Description
When creating a NewSelect with normal Options, I am able to display all my items while the cursor on the left moves up and down between them. The options are static. This is great.
When I create the same form with OptionsFunc the cursor becomes static and the options scroll up and down. This pushes the top options out of the view port.
// Here is the working Options way
huh.NewSelect[string]().
Title("Option Working List").
Options(
huh.NewOption("One", "one"),
huh.NewOption("Two", "two"),
huh.NewOption("Three", "three"),
)
As you can see in the image, the second option ("Two") is selected and "One" is still visible.
huh.NewSelect[string]().
Title("OptionFunc Not working List").
OptionsFunc(func() []huh.Option[string] {
return huh.NewOptions("One", "Two", "Three") // For simplicity
}, "option").
Image to show all three are displaying.
Now we select the second option, and the first option ("One") is out of the viewport.
Also note that for all of this I have set and unset the .Height(10) to test out if the viewport wasn't tall enough. This had no affect on the rendering issues.
Version
v0.8.0
Environment
Mac Arm (M1 pro) OS Sequoia 15.6.1 / Ghostty & Wezterm & iTerm2 / Tmux & without