mwouts / itables

Pandas DataFrames as Interactive DataTables
https://mwouts.github.io/itables/
MIT License
710 stars 53 forks source link

Tables in a Streamlit app have a fixed height that does not work well with lengthMenu or search extensions #275

Open mwouts opened 1 month ago

mwouts commented 1 month ago

See for instance https://itables.streamlit.app/ - add the pageLength control to the layout and then try to show 25 rows per page. Then the tables does not fit anymore in its iframe and only 12 rows are visible.

We need to figure out how to make the iframe responsive to the size of its content. I suspect the issue is with https://github.com/mwouts/itables/blob/4b92aad7055c1a61218e72ae0f1894f49cb36fd9/packages/itables_for_streamlit/src/index.tsx#L35 which calculates the height just when the table is initially displayed.

image