Browse Source

fix(dropdown): Select previous option in dropdown list when cancelling selection

tablepad
Andreas Bieber 2 years ago
parent
commit
e716d0acb9
  1. 1
      dropdown.go

1
dropdown.go

@ -666,6 +666,7 @@ func (d *DropDown) openList(setFocus func(Primitive)) {
d.evalPrefix()
} else if event.Key() == tcell.KeyEscape {
d.currentOption = optionBefore
d.list.SetCurrentItem(d.currentOption)
d.closeList(setFocus)
} else {
d.prefix = ""

Loading…
Cancel
Save