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] MultiChoice disabled attribute is not working #10452

Closed
maeglin89273 opened this issue Sep 2, 2020 · 1 comment · Fixed by #10456
Closed

[BUG] MultiChoice disabled attribute is not working #10452

maeglin89273 opened this issue Sep 2, 2020 · 1 comment · Fixed by #10456

Comments

@maeglin89273
Copy link

maeglin89273 commented Sep 2, 2020

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

@bryevdv
Copy link
Member

bryevdv commented Sep 2, 2020

Here is a debug version of the log:

Screen Shot 2020-09-02 at 8 56 05 AM

Screen Shot 2020-09-02 at 8 57 27 AM

@mattpap mattpap linked a pull request Sep 2, 2020 that will close this issue
@mattpap mattpap closed this as completed Sep 2, 2020
@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants