I'm trying to change the color of a tabulator cell based on the input of the cell. My first step was to just simply try and change the color of the cell. Run the following code, I see the following
function testFormatter(cell, formatterParams) {
cell.getElement().style.backgroundColor = "#A6A6DF";
}
Here is what my table looks like after using the cell formatter
I apologize if I get back to you late. This is my first StackOverflow post and I don't know how long replies usually take to come in.
I figured out the solution. The documentation doesn't say it, but custom formatters HAVE to return a value in some way, shape or form.
So the code to rectify the issue would simply be the following:
function testFormatter(cell, formatterParams) {
var bvid = cell.getValue();
cell.getElement().style.backgroundColor = "#A6A6DF";
return bvid
}