Skip to content

[BUG] MultiChoice disabled attribute is not working #10452

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions