Why doesn't row.child() add the class name?

Why doesn't row.child() add the class name?

ChrisDennisChrisDennis Posts: 12Questions: 5Answers: 0

The documentation for row.child() says I can do:

row().child( data [, className ] )

and it will add the class to the child rows.

It doesn't work for me though -- the child rows have no class attribute. Am I doing something wrong?

Here's the jsfiddle example.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    edited April 2015 Answer ✓

    This one is defiantly something for the documentation - if you pass in a row to be added it assumes that you have already setup it up the way you want. The class name will be added only to rows / cells that DataTables generates.

    Edit Committed here.

    Thanks!
    Allan

  • ChrisDennisChrisDennis Posts: 12Questions: 5Answers: 0

    OK, that makes sense.

    While you're tweaking the documentation, I noticed that className has a 'No' in the Optional column, which can't be right.

    Cheers,

    Chris

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Doh - yes. Committed

    Thanks!

    Allan

This discussion has been closed.