fix(picker): disable snap to items (default) to center selection in picker
This commit is contained in:
parent
663baf4b70
commit
7af199b5a3
1 changed files with 3 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue