@mui/x-data-grid 7.0.0-beta.1 → 7.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/CHANGELOG.md +223 -1
  2. package/DataGrid/DataGrid.d.ts +1 -1
  3. package/DataGrid/DataGrid.js +1 -7
  4. package/DataGrid/useDataGridProps.js +3 -1
  5. package/components/GridPagination.d.ts +1 -1
  6. package/components/GridPagination.js +12 -2
  7. package/components/GridRow.d.ts +3 -1
  8. package/components/GridRow.js +16 -6
  9. package/components/GridScrollbarFillerCell.js +0 -3
  10. package/components/base/GridFooterPlaceholder.js +1 -1
  11. package/components/cell/GridActionsCell.js +3 -3
  12. package/components/cell/GridActionsCellItem.d.ts +13 -1
  13. package/components/cell/GridActionsCellItem.js +27 -15
  14. package/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  15. package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
  16. package/components/columnsManagement/utils.d.ts +1 -1
  17. package/components/containers/GridRootStyles.js +9 -4
  18. package/components/panel/GridPanel.d.ts +1 -1
  19. package/components/panel/filterPanel/GridFilterInputBoolean.js +7 -5
  20. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +7 -5
  21. package/components/panel/filterPanel/GridFilterInputValue.js +4 -3
  22. package/components/panel/filterPanel/GridFilterPanel.js +1 -1
  23. package/components/virtualization/GridVirtualScrollerRenderZone.js +10 -3
  24. package/constants/gridClasses.d.ts +5 -0
  25. package/constants/gridClasses.js +1 -1
  26. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -5
  27. package/hooks/features/columnHeaders/useGridColumnHeaders.js +46 -48
  28. package/hooks/features/rows/gridRowsUtils.js +1 -1
  29. package/hooks/features/rows/useGridRows.js +2 -2
  30. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +9 -0
  31. package/hooks/features/virtualization/gridVirtualizationSelectors.js +7 -0
  32. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -1
  33. package/hooks/features/virtualization/useGridVirtualScroller.js +28 -26
  34. package/hooks/features/virtualization/useGridVirtualization.d.ts +8 -0
  35. package/hooks/features/virtualization/useGridVirtualization.js +6 -1
  36. package/index.js +1 -1
  37. package/internals/utils/propValidation.js +1 -1
  38. package/joy/joySlots.js +2 -2
  39. package/legacy/DataGrid/DataGrid.js +1 -7
  40. package/legacy/DataGrid/useDataGridProps.js +3 -1
  41. package/legacy/components/GridPagination.js +10 -2
  42. package/legacy/components/GridRow.js +16 -6
  43. package/legacy/components/GridScrollbarFillerCell.js +1 -3
  44. package/legacy/components/base/GridFooterPlaceholder.js +1 -1
  45. package/legacy/components/cell/GridActionsCell.js +3 -3
  46. package/legacy/components/cell/GridActionsCellItem.js +30 -17
  47. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  48. package/legacy/components/containers/GridRootStyles.js +8 -5
  49. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +7 -4
  50. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -5
  51. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  52. package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -1
  53. package/legacy/components/virtualization/GridVirtualScrollerRenderZone.js +10 -3
  54. package/legacy/constants/gridClasses.js +1 -1
  55. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +60 -63
  56. package/legacy/hooks/features/rows/gridRowsUtils.js +1 -1
  57. package/legacy/hooks/features/rows/useGridRows.js +2 -2
  58. package/legacy/hooks/features/virtualization/gridVirtualizationSelectors.js +9 -0
  59. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +28 -26
  60. package/legacy/hooks/features/virtualization/useGridVirtualization.js +6 -1
  61. package/legacy/index.js +1 -1
  62. package/legacy/internals/utils/propValidation.js +1 -1
  63. package/legacy/joy/joySlots.js +2 -2
  64. package/legacy/locales/daDK.js +12 -12
  65. package/locales/daDK.js +12 -12
  66. package/models/api/gridApiCommon.d.ts +1 -1
  67. package/models/api/gridFilterApi.d.ts +1 -1
  68. package/models/api/gridLocaleTextApi.d.ts +3 -3
  69. package/models/events/gridEventLookup.d.ts +2 -9
  70. package/models/gridSlotsComponent.d.ts +34 -36
  71. package/models/gridSlotsComponentsProps.d.ts +73 -54
  72. package/models/props/DataGridProps.d.ts +2 -8
  73. package/modern/DataGrid/DataGrid.js +1 -7
  74. package/modern/DataGrid/useDataGridProps.js +3 -1
  75. package/modern/components/GridPagination.js +12 -2
  76. package/modern/components/GridRow.js +15 -6
  77. package/modern/components/GridScrollbarFillerCell.js +0 -3
  78. package/modern/components/base/GridFooterPlaceholder.js +1 -1
  79. package/modern/components/cell/GridActionsCell.js +3 -3
  80. package/modern/components/cell/GridActionsCellItem.js +27 -15
  81. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  82. package/modern/components/containers/GridRootStyles.js +9 -4
  83. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +7 -5
  84. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +7 -5
  85. package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -3
  86. package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
  87. package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +10 -3
  88. package/modern/constants/gridClasses.js +1 -1
  89. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +46 -48
  90. package/modern/hooks/features/rows/gridRowsUtils.js +1 -1
  91. package/modern/hooks/features/rows/useGridRows.js +2 -2
  92. package/modern/hooks/features/virtualization/gridVirtualizationSelectors.js +7 -0
  93. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +27 -24
  94. package/modern/hooks/features/virtualization/useGridVirtualization.js +6 -1
  95. package/modern/index.js +1 -1
  96. package/modern/internals/utils/propValidation.js +1 -1
  97. package/modern/joy/joySlots.js +2 -2
  98. package/modern/locales/daDK.js +12 -12
  99. package/node/DataGrid/DataGrid.js +1 -7
  100. package/node/DataGrid/useDataGridProps.js +3 -1
  101. package/node/components/GridPagination.js +12 -2
  102. package/node/components/GridRow.js +15 -6
  103. package/node/components/GridScrollbarFillerCell.js +0 -3
  104. package/node/components/base/GridFooterPlaceholder.js +1 -1
  105. package/node/components/cell/GridActionsCell.js +3 -3
  106. package/node/components/cell/GridActionsCellItem.js +27 -15
  107. package/node/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  108. package/node/components/containers/GridRootStyles.js +9 -4
  109. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +7 -5
  110. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +7 -5
  111. package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -3
  112. package/node/components/panel/filterPanel/GridFilterPanel.js +1 -1
  113. package/node/components/virtualization/GridVirtualScrollerRenderZone.js +10 -3
  114. package/node/constants/gridClasses.js +1 -1
  115. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +45 -47
  116. package/node/hooks/features/rows/gridRowsUtils.js +2 -2
  117. package/node/hooks/features/rows/useGridRows.js +2 -2
  118. package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +8 -1
  119. package/node/hooks/features/virtualization/useGridVirtualScroller.js +26 -23
  120. package/node/hooks/features/virtualization/useGridVirtualization.js +7 -2
  121. package/node/index.js +1 -1
  122. package/node/internals/utils/propValidation.js +1 -1
  123. package/node/joy/joySlots.js +2 -2
  124. package/node/locales/daDK.js +12 -12
  125. package/package.json +4 -4
@@ -20,7 +20,7 @@ import { selectedIdsLookupSelector } from '../rowSelection/gridRowSelectionSelec
20
20
  import { gridRowsMetaSelector } from '../rows/gridRowsMetaSelector';
21
21
  import { getFirstNonSpannedColumnToRender } from '../columns/gridColumnsUtils';
22
22
  import { getMinimalContentHeight } from '../rows/gridRowsUtils';
23
- import { gridRenderContextSelector, gridVirtualizationEnabledSelector, gridVirtualizationColumnEnabledSelector } from './gridVirtualizationSelectors';
23
+ import { gridOffsetsSelector, gridRenderContextSelector, gridVirtualizationEnabledSelector, gridVirtualizationColumnEnabledSelector } from './gridVirtualizationSelectors';
24
24
  import { EMPTY_RENDER_CONTEXT } from './useGridVirtualization';
25
25
  import { jsx as _jsx } from "react/jsx-runtime";
26
26
  export const EMPTY_DETAIL_PANELS = Object.freeze(new Map());
@@ -37,7 +37,6 @@ export const useGridVirtualScroller = () => {
37
37
  const hasBottomPinnedRows = pinnedRows.bottom.length > 0;
38
38
  const [panels, setPanels] = React.useState(EMPTY_DETAIL_PANELS);
39
39
  const theme = useTheme();
40
- const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);
41
40
  const cellFocus = useGridSelector(apiRef, gridFocusCellSelector);
42
41
  const cellTabIndex = useGridSelector(apiRef, gridTabIndexCellSelector);
43
42
  const rowsMeta = useGridSelector(apiRef, gridRowsMetaSelector);
@@ -46,7 +45,6 @@ export const useGridVirtualScroller = () => {
46
45
  const gridRootRef = apiRef.current.rootElementRef;
47
46
  const mainRef = apiRef.current.mainElementRef;
48
47
  const scrollerRef = apiRef.current.virtualScrollerRef;
49
- const renderZoneRef = React.useRef(null);
50
48
  const scrollbarVerticalRef = React.useRef(null);
51
49
  const scrollbarHorizontalRef = React.useRef(null);
52
50
  const contentHeight = dimensions.contentSize.height;
@@ -54,6 +52,7 @@ export const useGridVirtualScroller = () => {
54
52
  useResizeObserver(mainRef, () => apiRef.current.resize());
55
53
  const previousContext = React.useRef(EMPTY_RENDER_CONTEXT);
56
54
  const previousRowContext = React.useRef(EMPTY_RENDER_CONTEXT);
55
+ const offsets = useGridSelector(apiRef, gridOffsetsSelector);
57
56
  const renderContext = useGridSelector(apiRef, gridRenderContextSelector);
58
57
  const scrollPosition = React.useRef({
59
58
  top: 0,
@@ -73,22 +72,17 @@ export const useGridVirtualScroller = () => {
73
72
  }
74
73
  return -1;
75
74
  }, [cellFocus, visibleColumns]);
76
- React.useEffect(() => {
77
- const direction = theme.direction === 'ltr' ? 1 : -1;
78
- const top = gridRowsMetaSelector(apiRef.current.state).positions[renderContext.firstRowIndex];
79
- const left = direction * columnPositions[renderContext.firstColumnIndex] - columnPositions[pinnedColumns.left.length];
80
- gridRootRef.current?.style.setProperty('--DataGrid-offsetTop', `${top}px`);
81
- gridRootRef.current?.style.setProperty('--DataGrid-offsetLeft', `${left}px`);
82
- }, [apiRef, gridRootRef, theme.direction, columnPositions, pinnedColumns.left.length, renderContext]);
83
75
  const updateRenderContext = React.useCallback((nextRenderContext, rawRenderContext) => {
84
76
  if (areRenderContextsEqual(nextRenderContext, apiRef.current.state.virtualization.renderContext)) {
85
77
  return;
86
78
  }
87
79
  const didRowsIntervalChange = nextRenderContext.firstRowIndex !== previousRowContext.current.firstRowIndex || nextRenderContext.lastRowIndex !== previousRowContext.current.lastRowIndex;
80
+ const nextOffsets = computeOffsets(apiRef, nextRenderContext, theme.direction, pinnedColumns.left.length);
88
81
  apiRef.current.setState(state => {
89
82
  return _extends({}, state, {
90
83
  virtualization: _extends({}, state.virtualization, {
91
- renderContext: nextRenderContext
84
+ renderContext: nextRenderContext,
85
+ offsets: nextOffsets
92
86
  })
93
87
  });
94
88
  });
@@ -102,7 +96,7 @@ export const useGridVirtualScroller = () => {
102
96
  }
103
97
  previousContext.current = rawRenderContext;
104
98
  prevTotalWidth.current = dimensions.columnsTotalWidth;
105
- }, [apiRef, dimensions.isReady, dimensions.columnsTotalWidth]);
99
+ }, [apiRef, pinnedColumns.left.length, theme.direction, dimensions.isReady, dimensions.columnsTotalWidth]);
106
100
  const triggerUpdateRenderContext = () => {
107
101
  const inputs = inputsSelector(apiRef, rootProps, enabled, enabledForColumns);
108
102
  const [nextRenderContext, rawRenderContext] = computeRenderContext(inputs, scrollPosition);
@@ -244,6 +238,14 @@ export const useGridVirtualScroller = () => {
244
238
  id,
245
239
  model
246
240
  } = renderedRows[i];
241
+ const rowIndexInPage = (currentPage?.range?.firstRowIndex || 0) + firstRowToRender + i;
242
+ let index = rowIndexOffset + rowIndexInPage;
243
+ if (isRowWithFocusedCellNotInRange && cellFocus?.id === id) {
244
+ index = indexOfRowWithFocusedCell;
245
+ isRowWithFocusedCellRendered = true;
246
+ } else if (isRowWithFocusedCellRendered) {
247
+ index -= 1;
248
+ }
247
249
  const isRowNotVisible = isRowWithFocusedCellNotInRange && cellFocus.id === id;
248
250
  const baseRowHeight = !apiRef.current.rowHasAutoHeight(id) ? apiRef.current.unstable_getRowHeight(id) : 'auto';
249
251
  let isSelected;
@@ -254,7 +256,7 @@ export const useGridVirtualScroller = () => {
254
256
  }
255
257
  let isFirstVisible = false;
256
258
  if (params.position === undefined) {
257
- isFirstVisible = i === 0;
259
+ isFirstVisible = rowIndexInPage === 0;
258
260
  }
259
261
  let isLastVisible = false;
260
262
  if (isLastSection) {
@@ -276,13 +278,6 @@ export const useGridVirtualScroller = () => {
276
278
  const cellParams = apiRef.current.getCellParams(id, cellTabIndex.field);
277
279
  tabbableCell = cellParams.cellMode === 'view' ? cellTabIndex.field : null;
278
280
  }
279
- let index = rowIndexOffset + (currentPage?.range?.firstRowIndex || 0) + firstRowToRender + i;
280
- if (isRowWithFocusedCellNotInRange && cellFocus?.id === id) {
281
- index = indexOfRowWithFocusedCell;
282
- isRowWithFocusedCellRendered = true;
283
- } else if (isRowWithFocusedCellRendered) {
284
- index -= 1;
285
- }
286
281
  rows.push( /*#__PURE__*/_jsx(rootProps.slots.row, _extends({
287
282
  row: model,
288
283
  rowId: id,
@@ -297,6 +292,7 @@ export const useGridVirtualScroller = () => {
297
292
  firstColumnToRender: firstColumnToRender,
298
293
  lastColumnToRender: lastColumnToRender,
299
294
  selected: isSelected,
295
+ offsets: offsets,
300
296
  dimensions: dimensions,
301
297
  isFirstVisible: isFirstVisible,
302
298
  isLastVisible: isLastVisible,
@@ -344,9 +340,6 @@ export const useGridVirtualScroller = () => {
344
340
  // TODO a scroll reset should not be necessary
345
341
  scrollerRef.current.scrollLeft = 0;
346
342
  scrollerRef.current.scrollTop = 0;
347
- } else {
348
- gridRootRef.current?.style.setProperty('--DataGrid-offsetTop', '0px');
349
- gridRootRef.current?.style.setProperty('--DataGrid-offsetLeft', '0px');
350
343
  }
351
344
  }, [enabled, gridRootRef, scrollerRef]);
352
345
  useRunOnce(outerSize.width !== 0, () => {
@@ -383,7 +376,6 @@ export const useGridVirtualScroller = () => {
383
376
  role: 'presentation'
384
377
  }),
385
378
  getRenderZoneProps: () => ({
386
- ref: renderZoneRef,
387
379
  role: 'rowgroup'
388
380
  }),
389
381
  getScrollbarVerticalProps: () => ({
@@ -595,4 +587,15 @@ export function areRenderContextsEqual(context1, context2) {
595
587
  return true;
596
588
  }
597
589
  return context1.firstRowIndex === context2.firstRowIndex && context1.lastRowIndex === context2.lastRowIndex && context1.firstColumnIndex === context2.firstColumnIndex && context1.lastColumnIndex === context2.lastColumnIndex;
590
+ }
591
+ function computeOffsets(apiRef, renderContext, direction, pinnedLeftLength) {
592
+ const factor = direction === 'ltr' ? 1 : -1;
593
+ const rowPositions = gridRowsMetaSelector(apiRef.current.state).positions;
594
+ const columnPositions = gridColumnPositionsSelector(apiRef);
595
+ const top = rowPositions[renderContext.firstRowIndex] ?? 0;
596
+ const left = factor * (columnPositions[renderContext.firstColumnIndex] ?? 0) - (columnPositions[pinnedLeftLength] ?? 0);
597
+ return {
598
+ top,
599
+ left
600
+ };
598
601
  }
@@ -1,6 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { useGridApiMethod } from '../../utils/useGridApiMethod';
4
+ export const EMPTY_OFFSETS = {
5
+ top: 0,
6
+ left: 0
7
+ };
4
8
  export const EMPTY_RENDER_CONTEXT = {
5
9
  firstRowIndex: 0,
6
10
  lastRowIndex: 0,
@@ -11,7 +15,8 @@ export const virtualizationStateInitializer = (state, props) => {
11
15
  const virtualization = {
12
16
  enabled: !props.disableVirtualization,
13
17
  enabledForColumns: true,
14
- renderContext: EMPTY_RENDER_CONTEXT
18
+ renderContext: EMPTY_RENDER_CONTEXT,
19
+ offsets: EMPTY_OFFSETS
15
20
  };
16
21
  return _extends({}, state, {
17
22
  virtualization
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.0.0-beta.1
2
+ * @mui/x-data-grid v7.0.0-beta.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,4 +1,4 @@
1
- export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You can not use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined];
1
+ export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined];
2
2
  const warnedOnceMap = new Set();
3
3
  const warnOnce = message => {
4
4
  if (!warnedOnceMap.has(message)) {
@@ -398,8 +398,8 @@ const joySlots = _extends({}, joyIconSlots, {
398
398
  baseSelect: Select,
399
399
  baseSelectOption: Option,
400
400
  baseInputLabel: InputLabel,
401
- baseFormControl: JoyFormControl,
402
- baseTooltip: JoyTooltip,
401
+ baseFormControl: JoyFormControl /* FIXME: typing error */,
402
+ baseTooltip: JoyTooltip /* FIXME: typing error */,
403
403
  pagination: Pagination,
404
404
  loadingOverlay: LoadingOverlay
405
405
  });
@@ -11,8 +11,8 @@ const daDKGrid = {
11
11
  toolbarDensityStandard: 'Standard',
12
12
  toolbarDensityComfortable: 'Luftig',
13
13
  // Columns selector toolbar button text
14
- toolbarColumns: 'Kolonne',
15
- toolbarColumnsLabel: 'Vælg kolonne',
14
+ toolbarColumns: 'Kolonner',
15
+ toolbarColumnsLabel: 'Vælg kolonner',
16
16
  // Filters toolbar button text
17
17
  toolbarFilters: 'Filtre',
18
18
  toolbarFiltersLabel: 'Vis filtre',
@@ -39,12 +39,12 @@ const daDKGrid = {
39
39
  filterPanelRemoveAll: 'Fjern alle',
40
40
  filterPanelDeleteIconLabel: 'Slet',
41
41
  filterPanelLogicOperator: 'Logisk operator',
42
- filterPanelOperator: 'Operatorer',
42
+ filterPanelOperator: 'Operator',
43
43
  filterPanelOperatorAnd: 'Og',
44
44
  filterPanelOperatorOr: 'Eller',
45
- filterPanelColumns: 'Kolonne',
45
+ filterPanelColumns: 'Kolonner',
46
46
  filterPanelInputLabel: 'Værdi',
47
- filterPanelInputPlaceholder: 'Filter værdi',
47
+ filterPanelInputPlaceholder: 'Filterværdi',
48
48
  // Filter operators text
49
49
  filterOperatorContains: 'indeholder',
50
50
  filterOperatorEquals: 'lig med',
@@ -91,10 +91,10 @@ const daDKGrid = {
91
91
  filterValueFalse: 'negativ',
92
92
  // Column menu text
93
93
  columnMenuLabel: 'Menu',
94
- columnMenuShowColumns: 'Vis Kolonner',
94
+ columnMenuShowColumns: 'Vis kolonner',
95
95
  columnMenuManageColumns: 'Administrer kolonner',
96
- columnMenuFilter: 'Filtre',
97
- columnMenuHideColumn: 'Skjul',
96
+ columnMenuFilter: 'Filtrer',
97
+ columnMenuHideColumn: 'Skjul kolonne',
98
98
  columnMenuUnsort: 'Fjern sortering',
99
99
  columnMenuSortAsc: 'Sorter stigende',
100
100
  columnMenuSortDesc: 'Sorter faldende',
@@ -124,13 +124,13 @@ const daDKGrid = {
124
124
  pinToRight: 'Fastgør til højre',
125
125
  unpin: 'Frigiv',
126
126
  // Tree Data
127
- treeDataGroupingHeaderName: 'Gruppering',
127
+ treeDataGroupingHeaderName: 'Gruppe',
128
128
  treeDataExpand: 'Vis underelementer',
129
129
  treeDataCollapse: 'Skjul underelementer',
130
130
  // Grouping columns
131
- groupingColumnHeaderName: 'Gruppér',
131
+ groupingColumnHeaderName: 'Gruppe',
132
132
  groupColumn: name => `Gruppér efter ${name}`,
133
- unGroupColumn: name => `Fjern gruppéring efter ${name}`,
133
+ unGroupColumn: name => `Fjern gruppering efter ${name}`,
134
134
  // Master/detail
135
135
  detailPanelToggle: 'Udvid/kollaps detaljepanel',
136
136
  expandDetailPanel: 'Udvid',
@@ -138,7 +138,7 @@ const daDKGrid = {
138
138
  // Row reordering text
139
139
  rowReorderingHeaderName: 'Omarrangering af rækker',
140
140
  // Aggregation
141
- aggregationMenuItemHeader: 'Aggregation',
141
+ aggregationMenuItemHeader: 'Aggregering',
142
142
  aggregationFunctionLabelSum: 'sum',
143
143
  aggregationFunctionLabelAvg: 'gns',
144
144
  aggregationFunctionLabelMin: 'min',
@@ -313,7 +313,7 @@ DataGridRaw.propTypes = {
313
313
  loading: _propTypes.default.bool,
314
314
  /**
315
315
  * Set the locale text of the Data Grid.
316
- * You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/grid/x-data-grid/src/constants/localeTextConstants.ts) in the GitHub repository.
316
+ * You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-data-grid/src/constants/localeTextConstants.ts) in the GitHub repository.
317
317
  */
318
318
  localeText: _propTypes.default.object,
319
319
  /**
@@ -501,12 +501,6 @@ DataGridRaw.propTypes = {
501
501
  * @param {GridCallbackDetails} details Additional details for this callback.
502
502
  */
503
503
  onRowDoubleClick: _propTypes.default.func,
504
- /**
505
- * Callback fired when the row changes are committed.
506
- * @param {GridRowId} id The row id.
507
- * @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
508
- */
509
- onRowEditCommit: _propTypes.default.func,
510
504
  /**
511
505
  * Callback fired when the row turns to edit mode.
512
506
  * @param {GridRowParams} params With all properties from [[GridRowParams]].
@@ -83,7 +83,9 @@ const DATA_GRID_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PROPS_DEFAULT_VALUES =
83
83
  };
84
84
  const defaultSlots = _defaultGridSlotsComponents.DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
85
85
  const useDataGridProps = inProps => {
86
- const themedProps = (0, _utils.useProps)((0, _styles.useThemeProps)({
86
+ const themedProps = (0, _utils.useProps)(
87
+ // eslint-disable-next-line material-ui/mui-name-matches-component-name
88
+ (0, _styles.useThemeProps)({
87
89
  props: inProps,
88
90
  name: 'MuiDataGrid'
89
91
  }));
@@ -33,13 +33,19 @@ const GridPaginationRoot = (0, _styles.styled)(_TablePagination.default)(({
33
33
  }
34
34
  }
35
35
  }));
36
+
37
+ // A mutable version of a readonly array.
38
+
36
39
  const GridPagination = exports.GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(props, ref) {
37
40
  const apiRef = (0, _useGridApiContext.useGridApiContext)();
38
41
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
39
42
  const paginationModel = (0, _useGridSelector.useGridSelector)(apiRef, _gridPaginationSelector.gridPaginationModelSelector);
40
43
  const visibleTopLevelRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _filter.gridFilteredTopLevelRowCountSelector);
41
44
  const rowCount = React.useMemo(() => rootProps.rowCount ?? visibleTopLevelRowCount ?? 0, [rootProps.rowCount, visibleTopLevelRowCount]);
42
- const lastPage = React.useMemo(() => Math.floor(rowCount / (paginationModel.pageSize || 1)), [rowCount, paginationModel.pageSize]);
45
+ const lastPage = React.useMemo(() => {
46
+ const calculatedValue = Math.ceil(rowCount / (paginationModel.pageSize || 1)) - 1;
47
+ return Math.max(0, calculatedValue);
48
+ }, [rowCount, paginationModel.pageSize]);
43
49
  const handlePageSizeChange = React.useCallback(event => {
44
50
  const pageSize = Number(event.target.value);
45
51
  apiRef.current.setPageSize(pageSize);
@@ -74,7 +80,11 @@ const GridPagination = exports.GridPagination = /*#__PURE__*/React.forwardRef(fu
74
80
  ref: ref,
75
81
  component: "div",
76
82
  count: rowCount,
77
- page: paginationModel.page <= lastPage ? paginationModel.page : lastPage,
83
+ page: paginationModel.page <= lastPage ? paginationModel.page : lastPage
84
+ // TODO: Remove the cast once the type is fixed in Material UI and that the min Material UI version
85
+ // for x-data-grid is past the fix.
86
+ // Note that Material UI will not mutate the array, so this is safe.
87
+ ,
78
88
  rowsPerPageOptions: pageSizeOptions,
79
89
  rowsPerPage: paginationModel.pageSize,
80
90
  onPageChange: handlePageChange,
@@ -31,7 +31,7 @@ var _utils2 = require("../utils/utils");
31
31
  var _GridCell = require("./cell/GridCell");
32
32
  var _GridScrollbarFillerCell = require("./GridScrollbarFillerCell");
33
33
  var _jsxRuntime = require("react/jsx-runtime");
34
- const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "renderedColumns", "pinnedColumns", "dimensions", "firstColumnToRender", "lastColumnToRender", "isFirstVisible", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
34
+ const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "renderedColumns", "pinnedColumns", "offsets", "dimensions", "firstColumnToRender", "lastColumnToRender", "isFirstVisible", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
35
35
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
36
36
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
37
37
  const useUtilityClasses = ownerState => {
@@ -45,9 +45,7 @@ const useUtilityClasses = ownerState => {
45
45
  classes
46
46
  } = ownerState;
47
47
  const slots = {
48
- root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', rowHeight === 'auto' && 'row--dynamicHeight'],
49
- pinnedLeft: ['pinnedLeft'],
50
- pinnedRight: ['pinnedRight']
48
+ root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', rowHeight === 'auto' && 'row--dynamicHeight']
51
49
  };
52
50
  return (0, _utils.unstable_composeClasses)(slots, _gridClasses.getDataGridUtilityClass, classes);
53
51
  };
@@ -77,6 +75,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
77
75
  visibleColumns,
78
76
  renderedColumns,
79
77
  pinnedColumns,
78
+ offsets,
80
79
  dimensions,
81
80
  firstColumnToRender,
82
81
  isFirstVisible,
@@ -281,7 +280,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
281
280
  width: width,
282
281
  contentWidth: contentWidth,
283
282
  field: column.field,
284
- align: column.align
283
+ align: column.align ?? 'left'
285
284
  }, column.field);
286
285
  }
287
286
  const {
@@ -369,7 +368,13 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
369
368
  "aria-selected": selected,
370
369
  style: style
371
370
  }, eventHandlers, other, {
372
- children: [leftCells, cells, emptyCellWidth > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyCell, {
371
+ children: [leftCells, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
372
+ role: "presentation",
373
+ className: _gridClasses.gridClasses.cellOffsetLeft,
374
+ style: {
375
+ width: offsets.left
376
+ }
377
+ }), cells, emptyCellWidth > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyCell, {
373
378
  width: emptyCellWidth
374
379
  }), rightCells.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
375
380
  role: "presentation",
@@ -437,6 +442,10 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
437
442
  isLastVisible: _propTypes.default.bool.isRequired,
438
443
  isNotVisible: _propTypes.default.bool,
439
444
  lastColumnToRender: _propTypes.default.number.isRequired,
445
+ offsets: _propTypes.default.shape({
446
+ left: _propTypes.default.number.isRequired,
447
+ top: _propTypes.default.number.isRequired
448
+ }).isRequired,
440
449
  onClick: _propTypes.default.func,
441
450
  onDoubleClick: _propTypes.default.func,
442
451
  onMouseEnter: _propTypes.default.func,
@@ -30,9 +30,6 @@ const Style = (0, _styles.styled)('div')({
30
30
  [`&.${classes.pinnedRight}:not(.${classes.header})`]: {
31
31
  position: 'sticky',
32
32
  right: 0
33
- },
34
- [`&:not(.${classes.header}):not(.${classes.pinnedRight})`]: {
35
- transform: 'translate3d(var(--DataGrid-offsetLeft), 0, 0)'
36
33
  }
37
34
  });
38
35
  function GridScrollbarFillerCell({
@@ -16,5 +16,5 @@ function GridFooterPlaceholder() {
16
16
  if (rootProps.hideFooter) {
17
17
  return null;
18
18
  }
19
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.footer, (0, _extends2.default)({}, rootProps.slotProps?.footer));
19
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.footer, (0, _extends2.default)({}, rootProps.slotProps?.footer /* FIXME: typing error */));
20
20
  }
@@ -145,7 +145,7 @@ function GridActionsCell(props) {
145
145
  if (event.key === 'Tab') {
146
146
  event.preventDefault();
147
147
  }
148
- if (['Tab', 'Enter', 'Escape'].includes(event.key)) {
148
+ if (['Tab', 'Escape'].includes(event.key)) {
149
149
  hideMenu();
150
150
  }
151
151
  };
@@ -182,7 +182,6 @@ function GridActionsCell(props) {
182
182
  target: buttonRef.current,
183
183
  position: position,
184
184
  onClose: hideMenu,
185
- onClick: hideMenu,
186
185
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuList.default, {
187
186
  id: menuId,
188
187
  className: _gridClasses.gridClasses.menuList,
@@ -191,7 +190,8 @@ function GridActionsCell(props) {
191
190
  variant: "menu",
192
191
  autoFocusItem: true,
193
192
  children: menuButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
194
- key: index
193
+ key: index,
194
+ closeMenu: hideMenu
195
195
  }))
196
196
  })
197
197
  })]
@@ -13,24 +13,22 @@ var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
13
13
  var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
14
14
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
- const _excluded = ["label", "icon", "showInMenu", "onClick"];
16
+ const _excluded = ["label", "icon", "showInMenu", "onClick"],
17
+ _excluded2 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"];
17
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
20
  const GridActionsCellItem = exports.GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
20
- const {
21
- label,
22
- icon,
23
- showInMenu,
24
- onClick
25
- } = props,
26
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
27
21
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
28
- const handleClick = event => {
29
- if (onClick) {
30
- onClick(event);
31
- }
32
- };
33
- if (!showInMenu) {
22
+ if (!props.showInMenu) {
23
+ const {
24
+ label,
25
+ icon,
26
+ onClick
27
+ } = props,
28
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
29
+ const handleClick = event => {
30
+ onClick?.(event);
31
+ };
34
32
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
35
33
  ref: ref,
36
34
  size: "small",
@@ -44,10 +42,24 @@ const GridActionsCellItem = exports.GridActionsCellItem = /*#__PURE__*/React.for
44
42
  })
45
43
  }));
46
44
  }
45
+ const {
46
+ label,
47
+ icon,
48
+ onClick,
49
+ closeMenuOnClick = true,
50
+ closeMenu
51
+ } = props,
52
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
53
+ const handleClick = event => {
54
+ onClick?.(event);
55
+ if (closeMenuOnClick) {
56
+ closeMenu?.();
57
+ }
58
+ };
47
59
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MenuItem.default, (0, _extends2.default)({
48
60
  ref: ref
49
61
  }, other, {
50
- onClick: onClick,
62
+ onClick: handleClick,
51
63
  children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
52
64
  children: icon
53
65
  }), label]
@@ -93,7 +93,7 @@ const GridCellCheckboxForwardRef = exports.GridCellCheckboxForwardRef = /*#__PUR
93
93
  },
94
94
  onKeyDown: handleKeyDown,
95
95
  disabled: !isSelectable,
96
- touchRippleRef: rippleRef
96
+ touchRippleRef: rippleRef /* FIXME: typing error */
97
97
  }, rootProps.slotProps?.baseCheckbox, other));
98
98
  });
99
99
  process.env.NODE_ENV !== "production" ? GridCellCheckboxForwardRef.propTypes = {
@@ -199,8 +199,6 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
199
199
  '--DataGrid-width': '0px',
200
200
  '--DataGrid-hasScrollX': '0',
201
201
  '--DataGrid-hasScrollY': '0',
202
- '--DataGrid-offsetTop': '0px',
203
- '--DataGrid-offsetLeft': '0px',
204
202
  '--DataGrid-scrollbarSize': '10px',
205
203
  '--DataGrid-rowWidth': '0px',
206
204
  '--DataGrid-columnsTotalWidth': '0px',
@@ -247,6 +245,12 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
247
245
  [`& .${_gridClasses.gridClasses.cell} > *`]: {
248
246
  overflow: 'visible !important',
249
247
  whiteSpace: 'nowrap'
248
+ },
249
+ [`& .${_gridClasses.gridClasses.groupingCriteriaCell}`]: {
250
+ width: 'unset'
251
+ },
252
+ [`& .${_gridClasses.gridClasses.treeDataGroupingCell}`]: {
253
+ width: 'unset'
250
254
  }
251
255
  },
252
256
  [`& .${_gridClasses.gridClasses.columnHeader}, & .${_gridClasses.gridClasses.cell}`]: {
@@ -561,8 +565,9 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
561
565
  }
562
566
  }
563
567
  },
564
- [`& .${_gridClasses.gridClasses.cell}:not(.${_gridClasses.gridClasses['cell--pinnedLeft']}):not(.${_gridClasses.gridClasses['cell--pinnedRight']})`]: {
565
- transform: 'translate3d(var(--DataGrid-offsetLeft), 0, 0)'
568
+ [`& .${_gridClasses.gridClasses.cellOffsetLeft}`]: {
569
+ flex: '0 0 auto',
570
+ display: 'inline-block'
566
571
  },
567
572
  [`& .${_gridClasses.gridClasses.columnHeaderDraggableContainer}`]: {
568
573
  display: 'flex',
@@ -13,7 +13,7 @@ var _utils = require("@mui/utils");
13
13
  var _styles = require("@mui/material/styles");
14
14
  var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
- const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "isFilterActive", "clearButton", "tabIndex", "label", "InputLabelProps"];
16
+ const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "isFilterActive", "clearButton", "tabIndex", "label", "variant", "InputLabelProps"];
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  const BooleanOperatorContainer = (0, _styles.styled)('div')({
@@ -32,7 +32,8 @@ function GridFilterInputBoolean(props) {
32
32
  focusElementRef,
33
33
  clearButton,
34
34
  tabIndex,
35
- label: labelProp
35
+ label: labelProp,
36
+ variant = 'standard'
36
37
  } = props,
37
38
  others = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
38
39
  const [filterValueState, setFilterValueState] = React.useState(item.value || '');
@@ -59,7 +60,7 @@ function GridFilterInputBoolean(props) {
59
60
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseInputLabel, (0, _extends2.default)({}, rootProps.slotProps?.baseInputLabel, {
60
61
  id: labelId,
61
62
  shrink: true,
62
- variant: "standard",
63
+ variant: variant,
63
64
  children: label
64
65
  })), /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseSelect, (0, _extends2.default)({
65
66
  labelId: labelId,
@@ -67,14 +68,15 @@ function GridFilterInputBoolean(props) {
67
68
  label: label,
68
69
  value: filterValueState,
69
70
  onChange: onFilterChange,
70
- variant: "standard",
71
+ variant: variant,
72
+ notched: variant === 'outlined' ? true : undefined,
71
73
  native: isSelectNative,
72
74
  displayEmpty: true,
73
75
  inputProps: {
74
76
  ref: focusElementRef,
75
77
  tabIndex
76
78
  }
77
- }, others, baseSelectProps, {
79
+ }, others /* FIXME: typing error */, baseSelectProps, {
78
80
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseSelectOption, (0, _extends2.default)({}, baseSelectOptionProps, {
79
81
  native: isSelectNative,
80
82
  value: "",
@@ -15,7 +15,7 @@ var _styles = require("@mui/material/styles");
15
15
  var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
16
16
  var _filterPanelUtils = require("./filterPanelUtils");
17
17
  var _jsxRuntime = require("react/jsx-runtime");
18
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "placeholder", "tabIndex", "label", "isFilterActive", "clearButton", "InputLabelProps"];
18
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "placeholder", "tabIndex", "label", "variant", "isFilterActive", "clearButton", "InputLabelProps"];
19
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
20
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
21
  const renderSingleSelectOptions = ({
@@ -58,6 +58,7 @@ function GridFilterInputSingleSelect(props) {
58
58
  placeholder,
59
59
  tabIndex,
60
60
  label: labelProp,
61
+ variant = 'standard',
61
62
  clearButton
62
63
  } = props,
63
64
  others = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
@@ -98,7 +99,7 @@ function GridFilterInputSingleSelect(props) {
98
99
  id: labelId,
99
100
  htmlFor: id,
100
101
  shrink: true,
101
- variant: "standard",
102
+ variant: variant,
102
103
  children: label
103
104
  })), /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseSelect, (0, _extends2.default)({
104
105
  id: id,
@@ -106,15 +107,16 @@ function GridFilterInputSingleSelect(props) {
106
107
  labelId: labelId,
107
108
  value: filterValue,
108
109
  onChange: onFilterChange,
109
- variant: "standard",
110
+ variant: variant,
110
111
  type: type || 'text',
111
112
  inputProps: {
112
113
  tabIndex,
113
114
  ref: focusElementRef,
114
115
  placeholder: placeholder ?? apiRef.current.getLocaleText('filterPanelInputPlaceholder')
115
116
  },
116
- native: isSelectNative
117
- }, others, rootProps.slotProps?.baseSelect, {
117
+ native: isSelectNative,
118
+ notched: variant === 'outlined' ? true : undefined
119
+ }, others /* FIXME: typing error */, rootProps.slotProps?.baseSelect, {
118
120
  children: renderSingleSelectOptions({
119
121
  column: resolvedColumn,
120
122
  OptionComponent: rootProps.slots.baseSelectOption,