I have multi-sorting enabled and have a class assigned based on the value of the cell. When my table loads it colors the correct cells with a background color, however if I sort the column, the class seems to stay in the same cells.
I am using a function in the cells() method to get the value of the cell on each render and set the class accordingly.
cells: (row, column, prop) => {
const commonValue = this.mostCommonColumnValueInColumn(column, row);
if(commonValue) {
cellProperties = {className: ''};
}
else {
cellProperties = {className: 'uniqueValues'};
}
return cellProperties;
},
Is there a better place to put the class setting for the cells? Maybe in the afterSortFinish? I can put together a working fiddle tomorrow.
Thanks