multiple class assignation in columnDefs is not working

multiple class assignation in columnDefs is not working

vismarkvismark Posts: 79Questions: 5Answers: 0
edited December 2018 in Free community support

I'm unable to assign more than 1 column class. While this is working correctly:
columnDefs: [{ className: "my_second_class", targets: 1 }]

this is not:
columnDefs: [{ className: "my_class", targets: "_all" }, { className: "my_second_class", targets: 1 }]

Library version is 1.10.18

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @vismark ,

    If you put my_second_class before the _all, it will take effect - see example here. The higher values take precedence, and overwrite what comes later. If you want column 1 to have both classes, you can just space-separate them as in my example.

    Cheers,

    Colin

This discussion has been closed.