Make text bold when letters are all capital letters

Tags: #<Tag:0x00007efc6020c7a0>

Dear handsontable,

I have a question about if it is possible to make text in a cell bold when they are in all capital letters? Right now I can do it when the data is loaded, but I would prefer to have it on change as well. There should be a way to change the cell renderer to do this right? If so could you please show me how to do it.

Best regards,
Ömer

        renderer: (hotInstance, td, row, column, prop, value, cellProperties) => {
            // Optionally include `BaseRenderer` which is responsible for
            // adding/removing CSS classes to/from the table cells.
            if (isUpperCase(value)) {
                cellProperties.className = "cell-bold"
            } else {
                cellProperties.className = "cell-underline"
            }
            console.log({hotInstance, td, row, column, prop, value, cellProperties})
            // ...your custom logic of the renderer
        }

I am trying something like this but the cells are now all empty. Do I need to return something?
I am using the handsontable in a react class component.

Hi @omerkati

Here you can find the example with solution to your issue: https://jsfiddle.net/1km2z7ax/6/

As you can observe, the class which is making the string bold doesn’t substract when you type a new value with lower case letters, for example. If you want to achieve something like this you need to use setCellMeta to provide null value for className.

I hope that helps.

Ahh I already had something like that, was hoping that this way would be more efficient. Thanks anyway