yosiz0
1
hey
i’m having trouble with word wraping (overflow) long text to multiple lines
tried adding the configuration in the user guide but the line is still unwrapped
```
style_data={'whiteSpace': 'normal'},
css=[{
'selector': '.dash-cell div.dash-cell-value',
'rule': 'display: inline; white-space: inherit; overflow: inherit; text-overflow: inherit;'
}],
```
yosiz0
2
some more information, this is the function i use to create the dataTable object:
def datatable(ctx,name='',df=None,columns=[],row_selectable=False,virtualization=False):
if df is None:
data = []
else:
data = df.to_dict('rows')
if len(columns)==0:
columns = [{"name": i, "id": i} for i in df.columns]
return dash_table.DataTable(
id=name+'dataTable_'+ctx,
style_cell={'textAlign': 'left','padding': '5px',
'overflow': 'hidden',
'textOverflow': 'ellipsis',
},
style_data={'whiteSpace': 'normal'},
css=[{
'selector': '.dash-cell div.dash-cell-value',
'rule': 'display: inline; white-space: inherit; overflow: inherit; text-overflow: inherit;'
}],
virtualization=virtualization,
columns=columns,
data = data,
sorting=True,
sorting_type="multi",
row_selectable=row_selectable,
selected_rows=[]
)