Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Dash DataTable - Cells with multiple lines

One question about row height. Is it possible to show multiple lines on the same cell instead of a row with all the text? By setting a higher row height can I get this?
I was trying with “\n” on the string but no luck.

Thank you!

This isn’t possible with the master release of Dash DataTable right now. It will be possible once is merged. In the meantime, you can use a html.Table by setting the cells of the table (html.Td) to be something like

html.Td([html.Div('line one'), html.Div('line two')])

See the first part of the user guide for an example of a html table:

Note that even once is merged, there wont’ be support for rows with varying heights - all of the rows will have to have the same height. So, if you want to have a row with multiple lines, all of the cells will need to have the height that accomidates that. This is a limitation with the underlying react-data-grid, see for details.