Hi,
So I couldn’t find any good solution to this and thought instead of creating a custom component maybe I could do it using a checkbox and a table, and then got to the point of using a checkbox, the cookie manager, and st.column.
Basic idea is that you use a variable to contain the indexes of the rows being selected, and the index is passed by the checkbox component to a function that updates the list of indexes checked. Then you can use this lookup into the dataframe!
The columns functionality seems to allow for word wrapping, the way that the HTML table does (I think you could use that, too). And maybe the st.container if you really want it to look like a table.
I think this probably does require some clearing of the caches.
Not sure if helpful to anyone because such an obscure use case not needing it in an actual table but figured I’d share!
Here’s a snippet illustrating how it might work: