If I’m passing a string, and that string is empty, I’m using cellrenderer to return the string –Unspecified–. However, the returned string is at the top left of the cell and not vertically centered as are all the rest of cells.
Why doesn’t this happen naturally? What do I need to do to keep everything uniform?
Here’s a sample I’m working with in Codepen.
Here’s the affected snippet where I’m using cellsrenderer
:
text: 'Birth Year',
dataField: 'birthYear',
filtertype: 'input',
width: '10%',
cellsRenderer: function (row, column, value, defaulthtml, columnproperties) {
if (value == '') {
return <code><i>--Unspecified--</i></code>;
}
}