material ui datagrid a status menu in table cell

Viewed 505
1 Answers

I recommend you use the renderCell property, which is more effective for substituting the content of a cell.

<DataGrid rows={[]} columns={[
  {
     field:"status",
     align:"center",
     headerName:"User status",
     renderCell({ row }){
        return <Menu>
          <MenuItem children="ACTIVE"/>
          <MenuItem children="INACTIVE"/>
         </Menu>
     }
  }
]} />
Related