-
Notifications
You must be signed in to change notification settings - Fork 4k
Allow configuring the row height for st.dataframe and st.data_editor
#9549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuring the row height for st.dataframe and st.data_editor
#9549
Conversation
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
…able-dataframe-row-height
|
Hey, I really need this feature, when can be expected to be merged? |
This will probably be released in 1.43 (~in one month). |
|
Cool, thanks! |
…able-dataframe-row-height
st.dataframe and st.data_editor
| element.useContainerWidth || | ||
| (notNullOrUndefined(element.width) && element.width > 0) | ||
|
|
||
| // Allow content wrapping if the configured row height is greater than 4rem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please make the comment more specific please and say why 4rem is the limit here? Where does this magic number come from, like is it arbitrarily chosen because it looks good or is it derived from some other sizes we have? Also, should it be theme-able in case someone changes the sizes of the overall app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arbitrarily chosen because it looks good
Yep, its arbitrarily chosen because it looked and felt good. I will add that as comment.
Also, should it be theme-able in case someone changes the sizes of the overall app?
Thats why it is using rem not px to automatically adapt to the configured root font size (the only way to currently re-scale apps). I will also add that as a comment.
| An optional dict of kwargs to pass to the callback. | ||
|
|
||
| row_height : int or None | ||
| The height of each row in the data editor in pixels. If ``row_height`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The height of each row in the data editor in pixels. If ``row_height`` | |
| The height of each row in the data editor in pixels. If ``row_height`` |
raethlein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just left a comment about where the 4rem are coming from
Describe your changes
Adds a
row_heightparameter tost.dataframeandst.data_editorthat allows the configuration of the row height. Also, potentially auto-activated word wrapping in text columns as shown here:GitHub Issue Link (if applicable)
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.