AutoCompleteInput bug?

Hi Everyone,

With the AutoCompleteInput widget, I’m noticing an unexpected behavior where if I enter text, select an item, clear the text box, and then reenter the same text to select the same item again, the text box does not refill with the selected item. Is there a way around this? It’s creating a friction point in my application.

Here’s a short video showing the outcome multiple times.


Looks like a bug on the bokeh side.
Indeed, the behaviour you point out is the same on the example page.

You cannot tab-complete (or click select) the same item1 two times in a row. However, if you tab complete another item2, then you are back being able to tab-complete item1.

This is the same issue as what it is discussed here. There is a proposed workaround on the python side.

You can see what is going on by looking at the Value field in the controls.

import panel as pn

autocomplete = pn.widgets.AutocompleteInput(options = ['Apple','Blueberry'],

pn.Row(autocomplete.controls(jslink=True), autocomplete).show()
1 Like

Thanks so much @marcbernot - Glad to know I’m not missing something here and that the workaround in mind is on point with what I was thinking of putting in place if need be.