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.
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.
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.