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

Text not wrapping, how to proceed? #355

Closed
joseberlines opened this issue Oct 14, 2022 · 2 comments
Closed

Text not wrapping, how to proceed? #355

joseberlines opened this issue Oct 14, 2022 · 2 comments

Comments

@joseberlines
Copy link

Describe the bug
I would like that when displaying a datagrid the text is wrapped

This is the code:

import ipydatagrid as grid
import pandas as pd

li = [['lorem','ipsum', 'rosae rosae long long '],['lorem','sfs/ df', 'rosae rosae'],['lorem','sfsd/df', 'rosae rosae'],['er/er','ipsum', 'rosae rosae'],['er/er','ipsum', 'rosae rosae'],['er er','ipsum', 'rosae rosae']]
df = pd.DataFrame(li)
default_renderer = grid.TextRenderer(
    background_color=grid.VegaExpr("cell.value <= 0.5 ? 'pink' : 'lawngreen'"),
    text_elide_direction="left",
    text_wrap=True) 

datagrid = grid.DataGrid(df, editable=True, default_renderer=default_renderer)
datagrid

The result is as follows in the screenshot and the text is not wrapped in several lines despite of the text_wrap = True nor the columns are autoscaled in lenght.
Does anyone know how to proceed?
image

@joseberlines
Copy link
Author

Could someone point to a repo/github gist / whatever using ipydatagrid in which indeed the text within the cells is wrapped in several lines?
thanks

@martinRenou
Copy link
Member

You already opened an issue for this #294.

Text wrapping is not implement for the body of the grid. This is a missing feature from Lumino, not an ipydatagrid issue. We can close it here. Please open an issue on the Lumino repository https://github.com/jupyterlab/lumino, we can continue the discussion there.

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