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)
@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.
Most helpful comment
I think it's a separate issue but I'll try to fix both at the same time.