Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

250
Visualizações
Changing Tabulator cell color through cell formatter is removing the value displayed

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.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

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
}

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda