Hello, I am working with gantt component and I try to change checkbox field's background color. Here is my codes:
private gantCellQuery = (args: any) => {
if (
args.column &&
args.column.type === 'checkbox' &&
args.data &&
args.cell
) {
let theData = args.data as any;
if (theData) {
let isEffected = theData.isEffected;
let theCurrenColor = 'tranparent';
if (isEffected) {
theCurrenColor = '#8ECDDD';
}
args.cell.setAttribute('style', `background-color:${theCurrenColor};`);
}
}
and I bind this function like that:
queryCellInfo={this.gantCellQuery.bind(this)}
{
displayAsCheckBox: true,
type: 'checkbox',
width: 75,
field: 'isChecked',
},
{
field: 'isEffected',
textAlign: 'Left',
width: 50,
visible: false,
clipMode: 'EllipsisWithTooltip',
type: 'boolean',
},
What am I doing wrong? It works properly on Grid Component.
Thank you.