Column renderer not working well when the class is changed

Tags: #<Tag:0x00007efc64ed2fa8>

Dear Handsontable,

I have an issue with the column renderer.
I have my column set up like this:

columns: [
    {
        //Sectie

        type: "text",
        data: "foo",
        renderer: boldRenderer,

    },
],

The boldRenderer is like this:

export function boldRenderer(instance, td, row, col, prop, value, cellProperties) {
    if (isUpperCase(td.innerHTML)) {
        td.className = "cell-bold"
    } else {
        td.className = "cell-underline"
    }

    Handsontable.renderers.NumericRenderer.apply(this, arguments);

}

This works but when I start scrolling the rows which are bold move around and become inconsistent until I click on the table again.

Any help with this would be greatly appreciated.

Best regards,
Ömer

I fixed it by checking the value instead of the td.innerHTML

Hi @omerkati

That’s great to hear, I’m closing the topic then.