St.checkbox in nicely formatted table

I have a table (so far itā€™s been created in Markdown). Iā€™d like to insert checkboxes in my table that control other content (presumably using st.checkbox)

Something like this

Anyone have ideas about how that could be done? Or reasonable alternatives?

3 Likes

HI @Dan_Becker

For now I think you will have to stick to existing widgets like select_box or radiobutton.

There are some feature requests for more advanced plugins (layouts, widgets).

See and upvote at

Your app looks really awesome. Which plotting library are you using?

Thanks Marc,

To answer your question, that plotting is in Altair.

I can see how my use case might be helped by 327. Iā€™m likely to comment/upvote in 271, 455 or 688 insteadā€¦ commenting here so you can help me if Iā€™ve misunderstood the suggestion for where those issues you linked can help.

There is an existing streamlit widget (st.checkbox) for the box I want to add, and the challenge is getting it into a table.

A feature like #327 would let me write my own table widget in JSX. If I can import the existing st.checkbox and embed it in that table, that would do the trick. But if I couldnā€™t import other streamlit widgets into my JSX for a table, it doesnā€™t get me any further than I am right now. I can comment in the issue about that.

Itā€™s less clear to me how the layout issues relate to my current problem. Iā€™m currently getting a somewhat horizontal layout through st.sidebar, and then putting a table there. But Iā€™ve been unable to do is put selectable boxes in that table. I havenā€™t been thinking of the layout on the page as part of the issue. Think Iā€™ve missed something?

Thanks for the pointer on #327.

Hi @Dan_Becker.

I think 327 is the right one for you.

The other issues is more about providing any kind of ā€œcallbackā€ and layout functionality.

1 Like

I have this exact use case as well.

1 Like

I do as well

Hello there,

Custom components, the new name for Streamlit plugins, is currently being beta tested, I recall this is a use case currently being implemented in JSX for test reasons so let me add more info there when itā€™s all completed :wink:

Hi @Dan_Becker thank you for the post. Have you found a solution ? I have a similar use case where I would like to embed a st.button in a table and it doesnā€™t seem to be possible for the moment.

Same here in Dec2020, i was looking this function as well, if someone can share it as component i will be very thanks
Hi @Dan_Becker thank you for the post. Have you found a solution ? I have a similar use case where I would like to embed a st.button in a table and it doesnā€™t seem to be possible for the moment

@apex_yu: Iā€™ve not looked recently, but havenā€™t found a solution.

One potential alternative solution could be this, Component for bi-directional communication with bokeh,

use bokeh data tables instead of st table with checkboxes.

may i ask is st.table responsive

Hi @Dan_Becker, do you solve this problem? can you share it? Thanks you very much

Hello,
you can use the custom component ā€œstreamlit aggridā€, which allows you to select rows in the table using a checkbox.You can find an excellent tutorial on this page. Paragraph 7 just describes the right case

@trnt I did not solve that while that project was live. But if I were working on this now, Iā€™d try the streamlit aggrid project that Dmitriy mentioned.

The little animation in their github README looks slick

Oh, that is great, thanks for your share