Skip to content

Commit

Permalink
[DataGrid] Make GridSortItem internal (#16732)
Browse files Browse the repository at this point in the history
  • Loading branch information
arminmeh authored Feb 25, 2025
1 parent d697a17 commit 0ab893a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ You have to import it from `@mui/x-license` instead:
- Return early if `apiRef` is `null`
- Throw an error if `apiRef` is `null`

- `GridSortItem` interface is not exported anymore.
- `createUseGridApiEventHandler()` is not exported anymore.
- The `showToolbar` prop is now required to display the toolbar.

Expand Down Expand Up @@ -337,7 +338,3 @@ You have to import it from `@mui/x-license` instead:
<!-- ### Editing
TBD
### Changes to slots
TBD -->
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/models/api/gridSortApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface GridSortApi {
* Sorts a column.
* @param {GridColDef['field']} field The field identifier of the column to be sorted.
* @param {GridSortDirection} direction The direction to be sorted. By default, the next in the `sortingOrder` prop.
* @param {boolean} allowMultipleSorting Whether to keep the existing [[GridSortItem]]. Default is `false`.
* @param {boolean} allowMultipleSorting Whether to keep the existing [GridSortModel]. Default is `false`.
*/
sortColumn: (
field: GridColDef['field'],
Expand Down
7 changes: 6 additions & 1 deletion packages/x-data-grid/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ export * from './gridDensity';
export * from './logger';
export * from './muiEvent';
export * from './events';
export * from './gridSortModel';
export type {
GridSortCellParams,
GridSortDirection,
GridComparatorFn,
GridSortModel,
} from './gridSortModel';
export * from './gridColumnGrouping';
export type { GridDataSourceCache } from './gridDataSource';
// Do not export GridExportFormat and GridExportExtension which are override in pro package
Expand Down
1 change: 0 additions & 1 deletion scripts/x-data-grid-premium.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@
{ "name": "gridSortedRowIdsSelector", "kind": "Variable" },
{ "name": "GridSortingInitialState", "kind": "Interface" },
{ "name": "GridSortingState", "kind": "Interface" },
{ "name": "GridSortItem", "kind": "Interface" },
{ "name": "GridSortModel", "kind": "TypeAlias" },
{ "name": "gridSortModelSelector", "kind": "Variable" },
{ "name": "GridState", "kind": "TypeAlias" },
Expand Down
1 change: 0 additions & 1 deletion scripts/x-data-grid-pro.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@
{ "name": "gridSortedRowIdsSelector", "kind": "Variable" },
{ "name": "GridSortingInitialState", "kind": "Interface" },
{ "name": "GridSortingState", "kind": "Interface" },
{ "name": "GridSortItem", "kind": "Interface" },
{ "name": "GridSortModel", "kind": "TypeAlias" },
{ "name": "gridSortModelSelector", "kind": "Variable" },
{ "name": "GridState", "kind": "TypeAlias" },
Expand Down
1 change: 0 additions & 1 deletion scripts/x-data-grid.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@
{ "name": "gridSortedRowIdsSelector", "kind": "Variable" },
{ "name": "GridSortingInitialState", "kind": "Interface" },
{ "name": "GridSortingState", "kind": "Interface" },
{ "name": "GridSortItem", "kind": "Interface" },
{ "name": "GridSortModel", "kind": "TypeAlias" },
{ "name": "gridSortModelSelector", "kind": "Variable" },
{ "name": "GridState", "kind": "TypeAlias" },
Expand Down

0 comments on commit 0ab893a

Please sign in to comment.