What i’m trying to do is this, but its not updating td element , like it does in cell renderer.
checkIfCol0Unique() {
const column = this.tableInstance.getDataAtCol(0);
column.forEach((value, row) => {
if (!(value == null || value === '')) {
let data = extend([], column);
const index = data.indexOf(value);
data.splice(index, 1);
const second_index = data.indexOf(value);
let cell = this.tableInstance.getCellMeta(row, 0);
let td = this.tableInstance.getCell(row, 0);
if (index > -1 && second_index > -1) {
this.setErrorContent(td, {
id: 'ipaddressduplicate',
contentText: "No Duplicate Value allowed"
})
} else {
console.log("td", td);
}
}
});
//force a re-render so the new cell properties show up
this.tableInstance.render();
}
setErrorContent(td: any, config: any){
td.className = 'htInvalid current highlight justify-end';
let Template: any;
Template = this.document.createElement('mat-icon');
Template.className =
'mat-icon icomoon justify-end Info-Outline color-accent';
Template.setAttribute('id', config.id);
const tooltip: any = new Tooltip().instance(Template);
tooltip?.setContent(config.contentText);
td.appendChild(Template);
}