Checklist
Summary
Setting height value for st.dataframe/st.data-editor intended for flex layout as described on the page of the update (#11930) will lead to error:
If we try to use mentioned in the error "stretch" value, we still get same error:
Reproducible Code Example
Steps To Reproduce
- Create some dataframe, let's say named as
test_df, with generated data, so that it has more than 10 rows
- Try to render it as
st.dataframe or st.data-editor, for example:
st.dataframe(test_df, height="content", key="testing_flex_layout")
Expected Behavior
st.dataframe element is successfully rendered, and its height is properly adjusted to number of rows our test_df has
Current Behavior
Error message:
streamlit.errors.StreamlitInvalidHeightError: Invalid height value: 'content'. Height must be either an integer (pixels) or 'stretch'.
Is this a regression?
Debug info
- Streamlit version: 1.49.0, 1.49.1
- Python version: 3.13.6
- Operating System: Windows 10 Enterprise 22H2
- Browser: Chrome 139.0.7258.155
Additional Information
No response
Checklist
Summary
Setting
heightvalue forst.dataframe/st.data-editorintended for flex layout as described on the page of the update (#11930) will lead to error:If we try to use mentioned in the error "stretch" value, we still get same error:
Reproducible Code Example
Steps To Reproduce
test_df, with generated data, so that it has more than 10 rowsst.dataframeorst.data-editor, for example:st.dataframe(test_df, height="content", key="testing_flex_layout")Expected Behavior
st.dataframeelement is successfully rendered, and its height is properly adjusted to number of rows ourtest_dfhasCurrent Behavior
Error message:
Is this a regression?
Debug info
Additional Information
No response