I need to know how to change this icon sort in material ui data grid to another icon
this my code for use data grid component
import { DataGrid, DataGridProps, GridColDef,GridColumnGroupingModel } from '@mui/x-data-grid'
export type TableColDef = GridColDef
export type TableColumnGroupingModel = GridColumnGroupingModel
export const Table = (p: DataGridProps) => {
return <DataGrid {...p} />
}
i tried to change with css and reseach in document i need to solution for work
2
Answers
You can make use of
DataGrid
‘s slot prop to add slots forcolumnFilteredIcon
slot.You can add this sx value:
<DataGrid ..... sx={{ "& .MuiDataGrid-sortIcon": { color: "green !important" } }} />
See the MUI doc on how to customize for more information