Experimental_data_editor: How to retrieve selection?

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.

Expected behavior:

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

Debug info

  • Streamlit version: 1.20
  • Python version: 3.10
  • Using Anaconda
  • OS version: macos Ventura 13.3
  • Browser version: safari v16.4
2 Likes

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.

1 Like

Thanks Mathcatsand!
Hope this event will be implemented soon.
In the meanwhile, Iโ€™ll stick with the AgGrid โ€ฆ
Best

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

4 Likes

Row 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