
Is it possible to disable a button right after clicking it and then enable it again after the on_click callback is finished?
Here’s a code that will demonstrate the scenario:
from bokeh.models.widgets.buttons import Button
from time import sleep
from bokeh.io import curdoc
# button
button = Button(
label="Test",
button_type='primary',
name="button"
)
# callback
def on_button_click():
button.disabled=True
sleep(10)
button.disabled=False
button.on_click(on_button_click)
curdoc().add_root(button)

