mirror of https://github.com/rivo/tview.git
Hiding autocomplete drop-down upon blur. Fixes #792
This commit is contained in:
parent
1dc4a83aff
commit
807cb4dd91
|
@ -403,6 +403,12 @@ func (i *InputField) SetFinishedFunc(handler func(key tcell.Key)) FormItem {
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Blur is called when this primitive loses focus.
|
||||||
|
func (i *InputField) Blur() {
|
||||||
|
i.Box.Blur()
|
||||||
|
i.autocompleteList = nil // Hide the autocomplete drop-down.
|
||||||
|
}
|
||||||
|
|
||||||
// Draw draws this primitive onto the screen.
|
// Draw draws this primitive onto the screen.
|
||||||
func (i *InputField) Draw(screen tcell.Screen) {
|
func (i *InputField) Draw(screen tcell.Screen) {
|
||||||
i.Box.DrawForSubclass(screen, i)
|
i.Box.DrawForSubclass(screen, i)
|
||||||
|
|
Loading…
Reference in New Issue