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?
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.
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
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
@jrieke can we get an update on this feature request? I’d like to retrieve the cell (or at least the row) that the user has selected for the st.data_editor. My use case is the value in the cell is passed into an API call.
I understand that a “hack” is to add a checkbox for each row, but I find row/cell selection to be a much nicer experience.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.