I have multiple DataGrid
tables in my project, but I cannot figure out what is wrong with this one.
I have created a codesandbox example of my problem. If anyone could help I would appreciate it very much.
It is probably a dumb mistake
You have declared a field with name license
2 times.
Changing to e.g.
{
field: "licence",
headerName: "Licence start",
flex: 1,
valueGetter: (params) =>
`${moment(params.row.licence.startsAt).format("DD.MM.YYYY") || ""}`
},
{
field: "licence2",
headerName: "Licence ends at",
flex: 1,
valueGetter: (params) =>
`${moment(params.row.licence.endsAt).format("DD.MM.YYYY") || ""}`
},
will solve the problem