Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!