Skip to content
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

Automatically resizing the row height, based on biggest cell. #449

Open
CYee3589 opened this issue Sep 27, 2023 · 1 comment
Open

Automatically resizing the row height, based on biggest cell. #449

CYee3589 opened this issue Sep 27, 2023 · 1 comment

Comments

@CYee3589
Copy link

Is your feature request related to a problem? Please describe.
No. I would like to know if such a feature currently exists, or is there any work around. It's frustrating to have a row only show the first line of a long str of cell data when using text_wrap=True. Sure I could resize all the rows to make them bigger, but most of the rows don't have a long str of cells, hence it would be a waste of space to give those rows bigger dimensions.

Describe the solution you'd like
Any functional solution would suffice, as long as it doesn't involve hard-coding the heights of these rows (since the data that I'm using is constantly being added and updated). Preferably though, it would like to have a boolean parameter to indicate automatic row height scaling.
For example: with a row that has 4 new lines worth of characters given my default datagrid settings, I would the the program to automatically resize the height of that specific row to fit the string, keeping the string's font size and cell's column size (this should apply to all rows that have this problem).

Describe alternatives you've considered
One alternative I have is to shrink the font size of the cell's contents, so that the string can scale with the given the cell's size.
For example: with a row that has 4 new lines worth of characters given my default datagrid settings, I would like the program to automatically change that specific cell's string's font size to show all the string's contents in the given space (this should also apply to all cells that have this problem). I would prefer my first solution, since shrinking the font would sometimes make that cell's string's contents illegible.

Additional context
I'm implementing a ipydatagrid object into a python shiny app, and using the shiny and shinywidget library in python. The main reason why I'm choosing a ipydatagrid ui object instead of the builtin shiny output_data_frame ui object is because ipydatagrid provides more customizations.

@smartinsightsfromdata
Copy link

What is the status of this issue? I've a similar use case: displaying large strings on a table in shiny python.
At the moment trying to use text_wrap=True or re-sizing the table does not seem to have any effet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants