Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data grid] Fix docs and missing export of GridColumnHeadersProps #13229

Merged
merged 3 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid-premium.json
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@
{
"name": "columnHeaders",
"description": "Component responsible for rendering the column headers.",
"default": "DataGridColumnHeaders",
"default": "GridColumnHeaders",
"class": "MuiDataGridPremium-columnHeaders"
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@
{
"name": "columnHeaders",
"description": "Component responsible for rendering the column headers.",
"default": "DataGridColumnHeaders",
"default": "GridColumnHeaders",
"class": "MuiDataGridPro-columnHeaders"
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
{
"name": "columnHeaders",
"description": "Component responsible for rendering the column headers.",
"default": "DataGridColumnHeaders",
"default": "GridColumnHeaders",
"class": "MuiDataGrid-columnHeaders"
},
{
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid-premium/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export * from './models';
export * from './components';

export { GridColumnHeaders } from '@mui/x-data-grid-pro';
export type { GridColumnHeadersProps } from '@mui/x-data-grid-pro';

export type {
DataGridPremiumProps,
Expand Down
4 changes: 2 additions & 2 deletions packages/x-data-grid-pro/src/components/GridColumnHeaders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const Filler = styled('div')({
backgroundColor: 'var(--DataGrid-containerBackground)',
});

interface DataGridProColumnHeadersProps
export interface GridColumnHeadersProps
extends React.HTMLAttributes<HTMLDivElement>,
UseGridColumnHeadersProps {}

const GridColumnHeaders = React.forwardRef<HTMLDivElement, DataGridProColumnHeadersProps>(
const GridColumnHeaders = React.forwardRef<HTMLDivElement, GridColumnHeadersProps>(
function GridColumnHeaders(props, ref) {
const {
style,
Expand Down
1 change: 1 addition & 0 deletions packages/x-data-grid-pro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ export {
} from './components/reexports';

export { GridColumnHeaders } from './components/GridColumnHeaders';
export type { GridColumnHeadersProps } from './components/GridColumnHeaders';
1 change: 1 addition & 0 deletions packages/x-data-grid/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type { GridToolbarExportProps } from './components/toolbar/GridToolbarExp
export type { GridExportFormat, GridExportExtension } from './models/gridExport';

export { GridColumnHeaders } from './components/GridColumnHeaders';
export type { GridColumnHeadersProps } from './components/GridColumnHeaders';

/**
* Reexportable components.
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/models/gridSlotsComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export interface GridSlotsComponent extends GridBaseSlots, GridIconSlotsComponen
columnMenu: React.JSXElementConstructor<GridSlotProps['columnMenu']>;
/**
* Component responsible for rendering the column headers.
* @default DataGridColumnHeaders
* @default GridColumnHeaders
*/
columnHeaders: React.JSXElementConstructor<GridSlotProps['columnHeaders']>;
/**
Expand Down
1 change: 1 addition & 0 deletions scripts/x-data-grid-premium.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
{ "name": "GridColumnHeaderSeparatorSides", "kind": "Enum" },
{ "name": "GridColumnHeaderSortIcon", "kind": "Variable" },
{ "name": "GridColumnHeaderSortIconProps", "kind": "Interface" },
{ "name": "GridColumnHeadersProps", "kind": "Interface" },
{ "name": "GridColumnHeaderTitle", "kind": "Function" },
{ "name": "GridColumnHeaderTitleProps", "kind": "Interface" },
{ "name": "GridColumnIcon", "kind": "Variable" },
Expand Down
1 change: 1 addition & 0 deletions scripts/x-data-grid-pro.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
{ "name": "GridColumnHeaderSeparatorSides", "kind": "Enum" },
{ "name": "GridColumnHeaderSortIcon", "kind": "Variable" },
{ "name": "GridColumnHeaderSortIconProps", "kind": "Interface" },
{ "name": "GridColumnHeadersProps", "kind": "Interface" },
{ "name": "GridColumnHeaderTitle", "kind": "Function" },
{ "name": "GridColumnHeaderTitleProps", "kind": "Interface" },
{ "name": "GridColumnIcon", "kind": "Variable" },
Expand Down
1 change: 1 addition & 0 deletions scripts/x-data-grid.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
{ "name": "GridColumnHeaderSeparatorSides", "kind": "Enum" },
{ "name": "GridColumnHeaderSortIcon", "kind": "Variable" },
{ "name": "GridColumnHeaderSortIconProps", "kind": "Interface" },
{ "name": "GridColumnHeadersProps", "kind": "Interface" },
{ "name": "GridColumnHeaderTitle", "kind": "Function" },
{ "name": "GridColumnHeaderTitleProps", "kind": "Interface" },
{ "name": "GridColumnIcon", "kind": "Variable" },
Expand Down
Loading