☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

AutocompleteInput accepts the chosen item only at the second time or trial

Community Support
Royalblue
Royalblue

I think some behavior of AutocompleteInput that I observed may be due to bugs:

  1. I have completions = [‘aaa’, ‘bbb’, ‘ccc’, ‘ddd’] . If I type in ‘aa’ then ‘aaa’ appears in the suggestion list, which is expected. I select ‘aaa’ from the suggestion but ‘aa’ is handed over to the callback, while I belive the natural behavior should be that ‘aaa’ is selcted. Right after this, I re-type ‘aa’ and choose ‘aaa’ from the suggestion list, then now ‘aaa’ is handed over to the callback. No matter what the completions list is, AutocompleteInput accepts the chosen item only at the second time or trial.

  2. The suggestion list only shows up when I type at least two letters. Why isn’t one character enough?

Here is a code snippet that I used:

from bokeh.models.widgets import AutocompleteInput
from bokeh.layouts import layout
from bokeh.io import curdoc

values = ['aaa', 'bbb', 'ccc', 'ddd']

choices = AutocompleteInput(completions=values, value = values[0], title='Choose')

def update(new):
    print(new)

choices.on_change('value', lambda att, old, new: update(new))

update(choices.value)

l = layout([
    [choices],
], sizing_mode='fixed')

curdoc().add_root(l)
curdoc().title = 'UI Test'
⌁   Link to post
Mateusz_Paprocki2
Mateusz_Paprocki2

Hi,

···

On Wed, Sep 27, 2017 at 6:45 AM, Sijun Cho royalblue.cho@gmail.com wrote:

I think some behavior of AutocompleteInput that I observed may be due to bugs:

  1. I have completions = [‘aaa’, ‘bbb’, ‘ccc’, ‘ddd’] . If I type in ‘aa’ then ‘aaa’ appears in the suggestion list, which is expected. I select ‘aaa’ from the suggestion but ‘aa’ is handed over to the callback, while I belive the natural behavior should be that ‘aaa’ is selcted. Right after this, I re-type ‘aa’ and choose ‘aaa’ from the suggestion list, then now ‘aaa’ is handed over to the callback. No matter what the completions list is, AutocompleteInput accepts the chosen item only at the second time or trial.
  1. The suggestion list only shows up when I type at least two letters. Why isn’t one character enough?

Here is a code snippet that I used:

from bokeh.models.widgets import AutocompleteInput
from bokeh.layouts import layout
from [bokeh.io](http://bokeh.io) import curdoc


values = ['aaa', 'bbb', 'ccc', 'ddd']

choices = AutocompleteInput(completions=values, value = values[0], title='Choose')

def update(new):
    print(new)


choices.on_change('value', lambda att, old, new: update(new))

update(choices.value)

l = layout([
    [choices],
], sizing_mode='fixed')

curdoc().add_root(l)
curdoc().title = 'UI Test'

Autocomplete widget is currently broken. Here’s https://github.com/bokeh/bokeh/issues/6822 at least one of relevant issues.

Mateusz

–

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4a5fb723-9371-4558-9632-1245a6b98576%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled