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

276
Views
Actualice los datos de la tabla en el interruptor en mui-datatables mientras mis datos están en booleanos

Quiero actualizar mis datos booleanos mientras se muestran en Switch en cada fila (datos obtenidos de firestore)

Los datos se muestran correctamente, pero al hacer clic en ellos para cambiarlos, ya sea verdadero o falso, no funciona. Aquí está mi código ..

 { name: "is_verified", label: "Verified", options: { customBodyRender: (value, tableMeta, updateValue) => { return ( <Switch checked={value} onChange={ async (e) => { e.preventDefault(); //tableMeta.rowData[0] is my document id const docsRef = doc(db, "vendors" , tableMeta.rowData[0]) await updateDoc(docsRef, { value: e.target.checked, }) } } name="active" color="primary" /> ) } } }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Problema resuelto

 { name: "is_verified", label: "Verified", options: { customBodyRender: (value, tableMeta, updateValue) => { return ( <Switch checked={value} onChange={ async (e) => { e.preventDefault(); updateValue(e.target.checked); //tableMeta.rowData[0] is my document id const docsRef = doc(db, "vendors" , tableMeta.rowData[0]) await updateDoc(docsRef, { is_verified: !value, }) } } name="active" color="primary" /> ) } } }

Documento en línea

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