Skip to content
This repository has been archived by the owner on Mar 20, 2022. It is now read-only.

Question: Clearing selection #3

Closed
ShaharMynd opened this issue Jan 24, 2021 · 2 comments
Closed

Question: Clearing selection #3

ShaharMynd opened this issue Jan 24, 2021 · 2 comments

Comments

@ShaharMynd
Copy link

ShaharMynd commented Jan 24, 2021

Hey,
I used normal ColumnDataSource, with columns

I see your reply here:
https://discuss.streamlit.io/t/make-streamlit-table-results-hyperlinks-or-add-radio-buttons-to-table/7883/2

And wondered how can I clear the selection?

result = streamlit_bokeh_events(bokeh_plot=p, events="INDEX_SELECT", key="foo", refresh_on_update=False, debounce_time=0)
@Amir-guez
Copy link

I was wondering the exact same thing , i could not find a way to clear the selection at all

@ash2shukla
Copy link
Owner

You need to use state logic and set refresh_on_update to True to handle selection in the code, something similar to this snippet, https://github.com/ash2shukla/streamlit-bokeh-events/blob/master/example/retain_state.py

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants