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

287
Vistas
MUI-Datatable: Displaying the data shows this error Cannot read properties of undefined (reading 'split')

When I added data here inside the MuiDatatable, it will show this error

Cannot read properties of undefined (reading 'split')

How do I fix this and display the data?

I have recreated the issue in codesandbox: https://codesandbox.io/s/xenodochial-fog-s984v0?file=/src/App.js

Codes:

export default function App() {
  console.log(data);
  const columns = [
    {
      name: "id",
      label: "System ID", //or the order ID here
      options: {
        filter: true,
        sort: true,
        display: false
      }
    },

    {
      label: "Name",
      options: {
        filter: true,
        sort: true
      }
    },
    {
      label: "Address",
      options: {
        filter: true,
        sort: true
      }
    },

    {
      label: "Cart Items",
      options: {
        filter: true,
        sort: true
      }
    },
    {
      label: "Total Amount",
      options: {
        filter: true,
        sort: true
      }
    }
  ];
  const options = {
    filter: true,
    selectableRows: "none",
    responsive: "simple"
    // onRowClick: handleRowClick,
  };
  return (
    <div className="App">
      <ThemeProvider theme={createTheme()}>
        {" "}
        <MUIDataTable
          title={"Reports"}
          options={options}
          columns={columns}
          data={data}
        />
      </ThemeProvider>
    </div>
  );
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Where is your data defined? Please make sure that data is an array of objects with structure as your columns array of the table.

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