Topic: How to prevent Datatable from truncating column text.
How to prevent data tables from truncating column text. It replaces excess text with "..." I would like it to wrap text instead so that all content in the column is visible.
Michał Duszak staff answered 3 years ago
Here is the snippet: https://mdbootstrap.com/snippets/standard/m-duszak/3921095#css-tab-view
I used this CSS:
.datatable table td {
white-space: normal;
text-overflow: ellipsis;
word-wrap: break-word;
}
max rioux pro premium priority commented 3 years ago
Thanks, I can't put the status to resolved since I'm not the OP but you solved it !
Michał Duszak staff answered 3 years ago
Try to add this in your styles:
.datatable table td, .datatable table th {
text-overflow: unset;
max-width: unset;
}
max rioux pro premium priority answered 3 years ago
Is there a way to make the datatable acting the same way as the table?(Transforming text-overflow to multiline)
penguin28 pro premium priority answered 3 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.9.0
- Device: MACOS
- Browser: Chrome
- OS: MACOS
- Provided sample code: No
- Provided link: No