fix(dropdown): Select previous option in dropdown list when cancelling selection
This commit is contained in:
parent
f71273b9c8
commit
e716d0acb9
|
@ -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…
Reference in New Issue