Hi,
First question here (but certainly not last) ^^. There is an old subject about this here: Add a classname to row but I guess it is outdated.
I want to add some css class to some rows. I do it like this:
ngOnInit(): void {
const that = this;
this.dataset = ...;
this.tableSettings = {
colHeaders: true,
contextMenu: true,
manualColumnResize: true,
data: this.dataset,
afterRender: (isForced) => {
const hotInstance = that.hotRegisterer.getInstance(that.hotId);
const cell = hotInstance.getCell(5, 0);
cell.parentElement.className = 'cat';
}
};
}
I wondered if there is a better way to do it? Also I am not sure about using the afterRender hook… basically, each time the data is reloaded, I need to set the CSS class.
Thank you for your help.
Vincent