Skip to content

[BUG] MultiChoice disabled attribute is not working #10452

Closed
@maeglin89273

Description

@maeglin89273

Version

Bokeh 2.2.1
Python 3.8

Description

While I set disabled of MultiChoice widget to true in a button click callback, the widget is not disabled as expected.
However, it can be disabled at the initialization or immediately disabled after the initialization.
Errors are logged in the browser console.

Example code:

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

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


disable_choices_button = Button(label='Disable')
def disable_choices():
    multi_choice.disabled = True
disable_choices_button.on_click(disable_choices)


widgets = column([multi_choice,
                  disable_choices_button])
curdoc().add_root(widgets)

Stack traceback and/or browser JavaScript console output

multichoice_bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions