Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum call stack exceeded in MUI DataGrid React

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

codesandbox example

like image 870
Jova Avatar asked Jun 09 '26 06:06

Jova


1 Answers

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

like image 117
Apostolos Avatar answered Jun 10 '26 21:06

Apostolos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!