Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

270
Vistas
Uncaught TypeError: Cannot read properties of undefined (reading 'start_time')

I am facing this error when I update my last end time of last interval although it updates my state but not showing it in table

enter image description here

 const onEdit = (oldValue, newValue, row, column) => {
    const oldRows = props.row;
    console.log("BHai", props.row.length - 1);
    if (column.dataField === "end_time") {
      if (newValue < oldRows[row.interval + 1].start_time) {
        oldRows[row.interval][column.dataField] = newValue;
        const startTime = parseInt(row.start_time);
        const endTime = parseInt(row.end_time);
        props.onIntervalUpdate([startTime, endTime], row.interval);
        console.log("BHai1");
      } else if (oldRows[row.interval].interval === props.row.length - 1) {
        oldRows[row.interval][column.dataField] = newValue;
        const startTime = parseInt(row.start_time);
        const endTime = parseInt(row.end_time);
        props.onIntervalUpdate([startTime, endTime], row.interval);
        console.log("BHai2");
      } else {
        oldRows[row.interval][column.dataField] = oldValue;
        const startTime = parseInt(row.start_time);
        const endTime = parseInt(row.end_time);
        props.onIntervalUpdate([startTime, endTime], row.interval);
        console.log("BHai3");
      }
    }

enter image description here

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Consider adding Optional chaining (?.) during destructuring, as:

newValue < oldRows[row.interval + 1]?.start_time)

and

 const startTime = parseInt(row?.start_time);
about 4 years ago · Juan Pablo Isaza Denunciar

0

figured it out like this,

if (
        oldRows[row.interval].interval === props.row.length - 1 &&
        oldRows[row.interval].start_time
      )

working fine for me

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda