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

267
Visualizações
Adding and removing CSS classes to the parent row based on the state of editable data in a child cell?

I’m working with the Editable Data example and it’s going swimmingly. One feature I need to add that I’m unsure of is the ability to set CSS classes on row based on the state of the data in a child cell. For instance:

  1. the table has a firstName column and that column is editable;
  2. once the user clicks into the input and changes the value, the row should have an .active class added to it (either within an onFocus or onChange event);
  3. when they submit the change (onBlur or hit the Enter key), that row will also get a .updating class;
  4. if the update is successful, the .active and .updating classes are removed;
  5. if not, the .updating is removed and a new .errored class is added.

Suggestions around intelligent ways to pass CSS classes around to the parent row like this based on a Cell’s editable input value?

Should I keep this out of react-table entirely and just keep tracks of row using useState and the row id?

Really appreciate any help I can get!

about 4 years ago · Juan Pablo Isaza
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