I am trying to show data of a Column inside chip
I tied to implement Chip to
code : https://stackblitz.com/edit/react-hymlnb?file=demo.tsx
webLink : https://react-hymlnb.stackblitz.io
I tried to implement using
import Chip from '@mui/material/Chip';
but could not implement Chip to that particular row.
Expectation :
Code :
import * as React from 'react';
import Box from '@mui/material/Box';
import { DataGrid, GridColDef, GridValueGetterParams } from '@mui/x-data-grid';
const columns: GridColDef[] = [
{ field: 'id', headerName: 'ID', width: 90 },
{
field: 'Name',
headerName: 'Name',
width: 150,
editable: true,
},
{
field: 'Status',
headerName: 'status',
width: 150,
editable: true,
},
];
const rows = [
{ id: 1, Status: 'Filled', Name: 'Jon' },
{ id: 2, Status: 'Filled', Name: 'Cersei' },
{ id: 3, Status: 'Rejected', Name: 'Jaime' },
{ id: 4, Status: 'Rejected', Name: 'Arya' },
{ id: 5, Status: 'Rejected', Name: 'Daenerys' },
{ id: 6, Status: 'Rejected', Name: 'Anurag' },
{ id: 7, Status: 'Filled', Name: 'Ferrara' },
{ id: 8, Status: 'Filled', Name: 'Rossini' },
{ id: 9, Status: 'Filled', Name: 'Harvey' },
];
export default function DataGridDemo() {
return (
<Box sx={{ height: 400, width: '100%' }}>
<DataGrid rows={rows} columns={columns} pageSize={5} />
</Box>
);
}