79574960

Date: 2025-04-15 10:54:20
Score: 2
Natty:
Report link

If you are using Material UI with "@mui/x-data-grid": "^7.28.3", params.api does not work. Instead we can precompute a serial field in rows.

<DataGrid rows={data.map((row,index)=>({...row,serial:index+1}))}

const column = [ { field: "serial", headerName: "ID", width: 70, sortable: false }]

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Shreya Joshi