Experimental_data_editor: How to retrieve selection?
Great new widget! Through session state, it’s easy to catch edited cells, as well as added and deleted rows.
Is there a way to retrieve selected rows by user? For instance, in order to refresh some charts or display more details based on the selected row or cell?
Thanks a lot
- Streamlit version: 1.20
- Python version: 3.10
- Using Anaconda
- OS version: macos Ventura 13.3
- Browser version: safari v16.4
Since row selection does not cause page reruns, it would appear the row selection is a purely front-end action at this time. However, you could could add another column to your dataframe of boolean type and use that to get information from the user about row selection.
Hope this event will be implemented soon.
In the meanwhile, I’ll stick with the AgGrid …
Hey Michell! Yes, we want to implement selections on rows. Unfortunately, we had to pause it for a while because we are currently focusing on some higher-priority features. But we hope to get back to it in a few months!
Btw you can always follow at roadmap.streamlit.app
selection would be a great feature. My use-case has parent/child tables, like to have parent row to trigger child table. Agree with @Michell, will use aggrid now and wait for future release. Thanks