Skip to content

[BUG] Cannot clear active of RadiGroup #11203

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

Closed
maeglin89273 opened this issue Apr 26, 2021 · 5 comments · Fixed by #11206
Closed

[BUG] Cannot clear active of RadiGroup #11203

maeglin89273 opened this issue Apr 26, 2021 · 5 comments · Fixed by #11206

Comments

@maeglin89273
Copy link

maeglin89273 commented Apr 26, 2021

Bug Description

Bokeh version 2.3.1
In the documentation, RadioGroup's active state is nullable. However, if I set active to None, the error occurs in the browser and the state remains. This still works in version 2.2.1.

Example Code

# test_radio_group.py
from bokeh.io import curdoc
from bokeh.models import Button, RadioGroup

clear_btn = Button(label='clear')
def clear_active():
    radio_btn_group.active = None

clear_btn.on_click(clear_active)
radio_btn_group = RadioGroup(labels=['a', 'b', 'c'], active=1)
curdoc().add_root(radio_btn_group)
curdoc().add_root(clear_btn)

run:
bokeh serve test_radio_group.py

Screenshots

Documentation

Screenshot from 2021-04-26 12-02-55

Browser Console Error

Screenshot from 2021-04-26 11-48-04

@bryevdv
Copy link
Member

bryevdv commented Apr 26, 2021

@maeglin89273 please add the missing portions of the example code so that it is a complete Minimal Reproducible Example

@maeglin89273
Copy link
Author

@bryevdv Import statements added. Thanks!

@mattpap
Copy link
Contributor

mattpap commented Apr 26, 2021

In bokeh RadioGroup.active can be nullable, but bokehjs doesn't allow this, both on API and implementation level. I have mixed feelings about allowing this.

@mattpap
Copy link
Contributor

mattpap commented Apr 26, 2021

Actually given that RadioButtonGroup already supports this, then this should be considered as a bug.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants