I want to add some invisible “meta-information” to every row of my data source and I can’t quite wrap my head around how to best achieve this. As of now, the meta information is contained inside an invisible column. I have created a small fiddle ilustrating this:
This behaves as expected - it colors the rows by level (the first - and hidden - column). However, I feel like the solution is not the “cleanest” way to solve the problem, and it is susceptible to this bug: [GH #5883] When using custom renderers, hiddenColumns and colWidths the rendering fails to work properly, which causes the HTML in the bottom of the table to not render any more.
It has been fixed in v8, but I cannot upgrade to that version.
I feel like
getCellMeta aren’t really appropriate, as they can only be used to add information after the table has been rendered. Setting the correct class name for every cell using the
cell option does feel rather verbose.
Is there a better way to do this?