Error: MUI: The data grid component requires all rows to have a unique id property

Error: MUI: The data grid component requires all rows to have a unique id property.
Alternatively, you can use the getRowId prop to specify a custom id for each row.
A row was provided without id in the rows prop:

The Material UI Data Grid needs to have a unique ID to identify the rows.

To specify the column with the unique numbers, use the getRowId property. 

      <DataGrid
        rows={rows}
        getRowId={(row) => row.MY_ID_COLUMN}
        columns={columns}
      />

Leave a comment

Your email address will not be published. Required fields are marked *