MUI X DataGridPro not rendering cellValue when column has valueOptions prop

44 Views Asked by At

I have MUI X DataGrid Pro with column:

{
  field: "productCategoryName",
  headerName: "Category",
  flex: 2,
},

Everything works well without valueOptions:

enter image description here

Category is showing.

But when I add valueOptions:

{
  field: "productCategoryName",
  headerName: "Category",
  flex: 2,
  type: "singleSelect",
  valueOptions: [
    { label: "Test", value: "guid" },
    { label: "Test Category 2", value: "guid2" },
  ],
},

cellValue disappears:

enter image description here

I have tried with valueOptions without value and that is also works fine, but I need it's to be an obejct:

{
  field: "productCategoryName",
  headerName: "Category",
  flex: 2,
  type: "singleSelect",
  valueOptions: ["Test", "Test2"],
},

[enter image description here](https://i.stack.imgur.com/3Y9r0.png)

0

There are 0 best solutions below