mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
3.88k stars 1.17k forks source link

[data grid] issue with using sx in GridToolbarColumnsButton #13057

Closed SeemaShettyVk closed 4 weeks ago

SeemaShettyVk commented 1 month ago

Capture

image

Hi, I am trying to use sx in GridToolbarColumnsButton but I am not able to use sx directly with GridToolbarColumnsButton, so i tried slotProps but it's not working. Please help.

Search keywords:

Search keywords:

SeemaShettyVk commented 1 month ago

Hi,

How can I inherit GridColDef. Please help me fix this.

image

Below is my GridColDef : image

michelengelen commented 1 month ago

Hey @SeemaShettyVk the correct way to use the sx prop in the GridToolbarColumnsButton component is this:

<GridToolbarColumnsButton slotProps={{ button: { sx: { margin: 2 } } }} />

How can I inherit GridColDef. Please help me fix this.

That would be this:

type CustomColDef = GridColDef & { customProp: string };

Do you have anything else you need some help with?

github-actions[bot] commented 4 weeks ago

The issue has been inactive for 7 days and has been automatically closed.