UNPKG

test-crud

Version:

es una prueba acerca de como publicar un package name

29 lines (26 loc) 773 B
import { DataGrid, GridCellEditStopReasons } from "@mui/x-data-grid"; import LinearProgress from "@mui/material/LinearProgress"; const AppTable = ({ columns, rows, loading, onUpdate, pageSize = 5 }) => { return ( <DataGrid autoHeight loading={loading} rows={rows} columns={columns} pageSize={pageSize} rowsPerPageOptions={[5]} disableSelectionOnClick onCellEditStop={(params, event) => { if (params.reason === GridCellEditStopReasons.cellFocusOut) { event.defaultMuiPrevented = true; } }} processRowUpdate={onUpdate} experimentalFeatures={{ newEditingApi: true }} components={{ LoadingOverlay: LinearProgress, }} /> ); }; export default AppTable;