This could be a silly question but I'm confuse and this doesn't make sense unless I'm missing something. I wanted to print my data as a PDF using the export option since is available for everyone according to the documentation, however I do not get to see the option, I can only see the CSV option ?
while on their example they have access to both CSV and Print MUI - Export
I also checked their code to see if they "added" something extra but is seems to be completely normal, they are even using the normal one and not the pro
And even if if they were using PRO is available for both options pro and free.
Am I missing something, is it no longer available ? This is what I have, I'm not missing anything...
UPDATE I just removed everything I wasn't using and is still not working
import React, {useState} from 'react'
import {DataGrid, GridToolbar} from '@mui/x-data-grid';
function VerPedidos() {
const data = JSON.parse(window.localStorage.getItem("verpedidos"))
let librosData = data[0].data
const [pageSize, setPageSize] = useState(10);
const [selectionModel, setSelectionModel] = useState([]);
const columns = [
{ field: 'descripcion', headerName: 'Descripción', width: 450 },
{field: 'tipo', headerName: 'Tipo', width: 150},
{field: 'editorial', headerName: 'Editorial', width: 100},
{field: 'precio', headerName: 'Precio', width: 100, align: 'right', sortable: false,
valueFormatter: (params) => {
return `$${params.value}`;
}}
]
return (
<DataGrid
rows={librosData}
columns={columns}
autoHeight
pageSize={pageSize}
onPageSizeChange={(newPageSize) => setPageSize(newPageSize)}
rowsPerPageOptions={[5, 10, 20]}
components={{
Toolbar: GridToolbar,
}}
/>
)
}
export default VerPedidos
package.json
"name": "venta_de_libros",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@material-ui/core": "^4.12.3",
"@material-ui/data-grid": "^4.0.0-alpha.37",
"@material-ui/icons": "^4.11.2",
"@mui/icons-material": "^5.0.1",
"@mui/material": "^5.0.4",
"@mui/styled-engine-sc": "^5.0.0",
"@mui/styles": "^5.0.1",
"@mui/x-data-grid": "^5.0.0-beta.5",
"@mui/x-data-grid-generator": "^5.0.0-beta.4",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"devextreme": "21.1.5",
"devextreme-react": "21.1.5",
"firebase": "^8.10.0",
"material-table": "^1.69.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.1",
"react-scripts": "4.0.3",
"react-select": "^4.3.1",
"styled-components": "^5.3.1",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}





