show extra/detailed information - add linebreaks to text in details

show extra/detailed information - add linebreaks to text in details

Pedro MartinsPedro Martins Posts: 22Questions: 11Answers: 0

Hello Again!
I have a column hidden in the show extra/detailed information Button
It´s a multi-line Text/Box. i need to show line breaks in it.
How should i solve this?

.multi-line{
   white-space: pre-wrap;
}

Setting a multi-line class would do the trick but i can´t seem to set it thru columnDef

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @Pedro Martins ,

    Have you tried using textarea? That should do the trick.

    Cheers,

    Colin

  • Pedro MartinsPedro Martins Posts: 22Questions: 11Answers: 0

    Thanks for the help @colin .Sometimes we just complicate...

    Just had to add the class "teste1" ! like this!
    ``
    var d = row.data();
    row.child(
    '<table cellpadding="10" white-space="pre-wrap" cellspacing="0" border="0" style="padding-left:50px;">' +
    '<tr>' +
    '<td>Observações:</td>' +
    '<td class="teste1">' + d.teste + '</td>' +
    '</tr>' +
    '</table>').show();
    tr.addClass('shown');`
    ```

This discussion has been closed.