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.91k stars 1.19k forks source link

[DataGrid] Export `GridColumnUnsortedIconProps` interface for custom slots #11341

Open michelengelen opened 6 months ago

michelengelen commented 6 months ago

Since the interface for GridColumnUnsortedIconProps is not exported (reference link below) users will have to create the interface in their implementation itself. It's easy, but shouldn't be needed tbh.

https://github.com/mui/mui-x/blob/e723473706d1c81678249ca61921a9d959cea750/packages/grid/x-data-grid/src/material/icons/GridColumnUnsortedIcon.tsx#L6-L8

Originally posted by @michelengelen in https://github.com/mui/mui-x/issues/11320#issuecomment-1845818262

Diff to fix this:

diff --git a/packages/grid/x-data-grid/src/material/icons/GridColumnUnsortedIcon.tsx b/packages/grid/x-data-grid/src/material/icons/GridColumnUnsortedIcon.tsx
index 4fe7d0596..a014822fc 100644
--- a/packages/grid/x-data-grid/src/material/icons/GridColumnUnsortedIcon.tsx
+++ b/packages/grid/x-data-grid/src/material/icons/GridColumnUnsortedIcon.tsx
@@ -3,7 +3,7 @@ import * as React from 'react';
 import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
 import { GridSortDirection } from '../../models/gridSortModel';

-interface GridColumnUnsortedIconProps extends SvgIconProps {
+export interface GridColumnUnsortedIconProps extends SvgIconProps {
   sortingOrder: GridSortDirection[];
 }

Search keywords:

AshishDhama commented 6 months ago

@michelengelen Could you please assign this one to me

michelengelen commented 6 months ago

@AshishDhama sure ... If you need help setting up the project feel free to reach out. Otherwise... Happy coding! 💪🏼