fix(picker): disable snap to items (default) to center selection in picker

This commit is contained in:
ayn2op 2026-02-08 19:08:38 -05:00
parent 663baf4b70
commit 7af199b5a3

View file

@ -32,11 +32,11 @@ func New() *Picker {
}
// Show a horizontal bottom border to visually separate input from list.
borderSet := tview.BorderSet{
Bottom: tview.BoxDrawingsLightHorizontal,
}
var borderSet tview.BorderSet
borderSet.Bottom = tview.BoxDrawingsLightHorizontal
borderSet.BottomLeft = borderSet.Bottom
borderSet.BottomRight = borderSet.Bottom
p.input.
SetChangedFunc(p.onInputChanged).
SetLabel("> ").
@ -45,8 +45,6 @@ func New() *Picker {
SetBorderStyle(tcell.StyleDefault.Dim(true)).
SetInputCapture(p.onInputCapture)
p.list.SetSnapToItems(true)
p.
SetDirection(tview.FlexRow).
// bottom border + value