I would like to add a column like Filled Status
But I cannot figure out how to do it from the docs, I feel like I have to use renderCell when setting up the column but I can't see how to accomplish it.
https://mui.com/components/data-grid/demo/
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>
}
}
]} />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.