Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot disable MultiSelect in 2.2.1 #10507

rstrutt opened this issue Sep 18, 2020 · 2 comments · Fixed by #10517

[BUG] Cannot disable MultiSelect in 2.2.1 #10507

rstrutt opened this issue Sep 18, 2020 · 2 comments · Fixed by #10517


Copy link

rstrutt commented Sep 18, 2020

Issue originally raised on Discourse, here:

ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

Bokeh 1.4.0 (works), Bokeh 2.2.0 (shows the issue)
Python 3.7.3
Chrome 78.0.3904.108 (Official Build) (64-bit)
Windows 7 Professional SP1

Description of expected behavior and the observed behavior

Setting the disabled property of a MultiSelect on the Python side throws a javascript error rather than disabling/enabling the control.

The functionality works as expected for Select widgets but not MultiSelect widgets (it works for both widget types in 1.4.0).

Complete, minimal, self-contained example code that reproduces the issue

Minimal code example below, to be invoked with 'bokeh serve'.

Click on the button - it simply sets the disabled property of the MultiSelect. Observe the javascript error in the console and the widget not being disabled.

Un-comment the Select widget line (and comment the MultiSelect) to observe the expected behavior of the widget being disabled.

from bokeh.layouts import column
    from bokeh.models import Button, MultiSelect, Select
    from bokeh.plotting import curdoc

    # Get a reference to the document we will be creating
    doc = curdoc()

    # Create a Button and a MultiSelect box
    button = Button(label='Press Here')
    select = MultiSelect(options=[('A', 'B'), ('C', 'D')])  # <-- Throws JS error when disabled
    # select = Select(options=[('A', 'B'), ('C', 'D')])  # <-- Does not throw JS error when disabled

    # Add a python callback on the Button to disable the MultiSelect/Select.
    def button_handler():
        select.disabled = True


    # Put them in a column
    col = column(button, select)

    # Put the column into the document

Screenshots or screencasts of the bug in action

Screenshot of the javascript console after pressing the button;


@rstrutt rstrutt added the TRIAGE label Sep 18, 2020
Copy link

mattpap commented Sep 18, 2020

Possibly related to or duplicate of #10296.

@rstrutt rstrutt changed the title [BUG] Cannot disable MultiSelect in 2.2.1 Sep 19, 2020
@rstrutt rstrutt changed the title Cannot disable MultiSelect in 2.2.1 [BUG] Cannot disable MultiSelect in 2.2.1 Sep 19, 2020
@mattpap mattpap added this to the 2.3 milestone Sep 23, 2020
Copy link

rstrutt commented Sep 23, 2020

Fantastic - thanks for the awesomely quick turnaround, chaps.

@philippjfr philippjfr modified the milestones: 2.3, 2.2.2 Oct 6, 2020
@mattpap mattpap modified the milestones: 2.2.2, 2.3 Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

4 participants