I have a MultiSelect drop-down list in Bokeh application. I want to un-select all the values after my work is done.
There is no UI interaction the widget itself offers as far as I know to clear it. You could make a button with a CustomJS
callback that resets the MultiSelect
values:
select = MultiSelect(options=["First", "Second", "Third"])
button = Button(label="clear")
callback = CustomJS(args=dict(s=select), code="s.value=[]")
button.js_on_event('button_click', callback)
Before clicking the button:
After clicking the button: