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

424
Vistas
react mui-datatables, can't export only selected rows

I'm using "mui-datatables": "^4.2.2",

I wonder if this library is customizable enough to work with, because currently I just want to export the rows of tables that are selected.

enter image description here

I used the default download button of the library and also I added a custom button to allow the download of only selected table rows

const options = {
    ...  // other options
     onDownload: (buildHead, buildBody, columns, rows) => {
      console.log(rows); //  <-------- can't get only selected rows
    },
    customToolbarSelect: (selectedRows, displayData, setSelectedRows) => {
      return (
        <Box mr={4}>
          <Fab
            variant="extended"
            size="small"
            color="primary"
            aria-label="add"
            onClick={() => console.log(displayData)} // <--- can't get selected rows
          >
            <FileDownloadRounded />
            Exporter
          </Fab>
        </Box>
      );
    },

}

I used a customToolbarSelect and i tried to customize onDownload but i can't get only selected rows.

How can i correctly download only selected rows ?

Thank you !

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