Bokeh: [BUG] MultiChoice displayed value is not updating

Created on 14 Apr 2020  路  3Comments  路  Source: bokeh/bokeh

Bokeh Version: 2.0.1

I want to load the selections into MultiChoice programmatically, but the widget UI doesn't update.
I'm sure the MultiChoice value is set correctly, and the on_change('value') event is triggered as expected.

Example

import random

from bokeh.io import curdoc
from bokeh.layouts import column
from bokeh.models import MultiChoice, Button, Paragraph

options = [str(i) for i in range(1, 10)]
multi_choice = MultiChoice(options=options)

load_random_choices_button = Button(label='Load From the external resource')
debug_paragraph = Paragraph()

def on_load_choices():
    choices = random.sample(options, k=3)
    multi_choice.value = choices
    debug_paragraph.text = ', '.join(choices)

load_random_choices_button.on_click(on_load_choices)

widgets = column([multi_choice, load_random_choices_button, debug_paragraph])
curdoc().add_root(widgets)
completed tag bokehjs widgets bug

Most helpful comment

I think it's a separate issue but I'll try to fix both at the same time.

All 3 comments

@philippjfr is this the issue we discusses previously, or a dupe? I thought it had already nbeen triaged (and was even in a milestone at one point) I can't find antything.

Tentatively triaging for now but please let me know if you know of a dupe.

I think it's a separate issue but I'll try to fix both at the same time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darribas picture darribas  路  3Comments

samhile picture samhile  路  3Comments

nmvasani picture nmvasani  路  3Comments

dhirschfeld picture dhirschfeld  路  4Comments

rornor picture rornor  路  3Comments