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

92
Vistas
React table with mui - mui kitchen sink example - switching JSON and makeDATA

i'm tryning to play with the react table mui kitchen sink and do not understand why the value aren't visible . the Header is visible when switching to JSON it's the data in the table not visible anymore. on the console.log, data and data1 have the same structure.


      const columns = React.useMemo(
        () => [
          {
            Header: 'ID',
            accessor: 'id',
          },
          {
            Header: 'LICENSE PLATE',
            accessor: 'licenseplate',
          },
          {
            Header: 'DRIVER NAME',
            accessor: 'driver',
          },
          {
            Header: 'SUBMITTED ON',
            accessor: 'submittionDate',
          },
          {
            Header: 'NOTES',
            accessor: 'notes',
          },
          {
            Header: 'STATUS',
            accessor: 'status',
          },
        ],
        []
      )
     const NoteList = Object.keys(NOTES).map(key => ({ ...NOTES[key], id: key }))
      const [data1, setData1] = React.useState(React.useMemo(() => makeData(10), []))
      const [data, setData] = React.useState(React.useMemo(() => NoteList), [])
      const [skipPageReset, setSkipPageReset] = React.useState(false)
    
    
      useEffect(() => {
        // This gets called after every render, by default
        // (the first one, and every one after that)
        // console.log('NOTES', NOTES);
        // console.log('NOTESLIST', NoteList);
        console.log('DATA', data);
        console.log('DATA1', data1);
    
      }, [])

i don't know where's the mistake.

thanks for the help

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

0

After some hours, the mistake has been solved.

The accessor name has to match the name attribute in the json file. And there's no need to use the object.key function. the use of useMemo is enough.

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