@mui/x-data-grid 7.27.2 → 7.28.0

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 (168) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +1 -1
  3. package/components/cell/GridActionsCell.js +3 -1
  4. package/components/cell/GridCell.js +2 -2
  5. package/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -1
  6. package/components/containers/GridRootStyles.js +3 -3
  7. package/components/panel/filterPanel/GridFilterInputValue.d.ts +4 -0
  8. package/components/panel/filterPanel/index.d.ts +1 -1
  9. package/components/panel/filterPanel/index.js +1 -1
  10. package/components/virtualization/GridBottomContainer.js +1 -1
  11. package/components/virtualization/GridTopContainer.js +1 -1
  12. package/components/virtualization/GridVirtualScrollbar.js +9 -3
  13. package/constants/localeTextConstants.js +1 -0
  14. package/hooks/features/editing/useGridRowEditing.js +19 -10
  15. package/hooks/features/export/useGridPrintExport.js +4 -4
  16. package/hooks/features/filter/useGridFilter.js +5 -0
  17. package/hooks/features/rowSelection/useGridRowSelection.js +47 -11
  18. package/hooks/features/rowSelection/utils.d.ts +2 -2
  19. package/hooks/features/rowSelection/utils.js +8 -6
  20. package/hooks/features/rows/useGridRowsMeta.js +8 -0
  21. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
  22. package/hooks/features/virtualization/useGridVirtualScroller.js +0 -2
  23. package/index.js +1 -1
  24. package/locales/arSD.js +1 -0
  25. package/locales/beBY.js +1 -0
  26. package/locales/bgBG.js +1 -0
  27. package/locales/bnBD.js +1 -0
  28. package/locales/csCZ.js +6 -6
  29. package/locales/daDK.js +1 -0
  30. package/locales/deDE.js +1 -0
  31. package/locales/elGR.js +1 -0
  32. package/locales/esES.js +1 -0
  33. package/locales/faIR.js +1 -0
  34. package/locales/fiFI.js +1 -0
  35. package/locales/frFR.js +1 -0
  36. package/locales/heIL.js +1 -0
  37. package/locales/hrHR.js +1 -0
  38. package/locales/huHU.js +1 -0
  39. package/locales/isIS.js +1 -0
  40. package/locales/itIT.js +1 -0
  41. package/locales/jaJP.js +1 -0
  42. package/locales/koKR.js +2 -1
  43. package/locales/nbNO.js +1 -0
  44. package/locales/nlNL.js +1 -0
  45. package/locales/nnNO.js +1 -0
  46. package/locales/plPL.js +1 -0
  47. package/locales/ptBR.js +1 -0
  48. package/locales/ptPT.js +1 -0
  49. package/locales/roRO.js +1 -0
  50. package/locales/ruRU.js +1 -0
  51. package/locales/skSK.js +7 -7
  52. package/locales/svSE.js +1 -0
  53. package/locales/trTR.js +1 -0
  54. package/locales/ukUA.js +1 -0
  55. package/locales/urPK.js +1 -0
  56. package/locales/viVN.js +1 -0
  57. package/locales/zhCN.js +1 -0
  58. package/locales/zhHK.js +11 -11
  59. package/locales/zhTW.js +10 -10
  60. package/models/api/gridLocaleTextApi.d.ts +1 -0
  61. package/models/api/gridRowSelectionApi.d.ts +15 -4
  62. package/modern/components/cell/GridActionsCell.js +3 -1
  63. package/modern/components/cell/GridCell.js +2 -2
  64. package/modern/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -1
  65. package/modern/components/containers/GridRootStyles.js +3 -3
  66. package/modern/components/panel/filterPanel/index.js +1 -1
  67. package/modern/components/virtualization/GridBottomContainer.js +1 -1
  68. package/modern/components/virtualization/GridTopContainer.js +1 -1
  69. package/modern/components/virtualization/GridVirtualScrollbar.js +9 -3
  70. package/modern/constants/localeTextConstants.js +1 -0
  71. package/modern/hooks/features/editing/useGridRowEditing.js +19 -10
  72. package/modern/hooks/features/export/useGridPrintExport.js +4 -4
  73. package/modern/hooks/features/filter/useGridFilter.js +5 -0
  74. package/modern/hooks/features/rowSelection/useGridRowSelection.js +47 -11
  75. package/modern/hooks/features/rowSelection/utils.js +8 -6
  76. package/modern/hooks/features/rows/useGridRowsMeta.js +8 -0
  77. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +0 -2
  78. package/modern/index.js +1 -1
  79. package/modern/locales/arSD.js +1 -0
  80. package/modern/locales/beBY.js +1 -0
  81. package/modern/locales/bgBG.js +1 -0
  82. package/modern/locales/bnBD.js +1 -0
  83. package/modern/locales/csCZ.js +6 -6
  84. package/modern/locales/daDK.js +1 -0
  85. package/modern/locales/deDE.js +1 -0
  86. package/modern/locales/elGR.js +1 -0
  87. package/modern/locales/esES.js +1 -0
  88. package/modern/locales/faIR.js +1 -0
  89. package/modern/locales/fiFI.js +1 -0
  90. package/modern/locales/frFR.js +1 -0
  91. package/modern/locales/heIL.js +1 -0
  92. package/modern/locales/hrHR.js +1 -0
  93. package/modern/locales/huHU.js +1 -0
  94. package/modern/locales/isIS.js +1 -0
  95. package/modern/locales/itIT.js +1 -0
  96. package/modern/locales/jaJP.js +1 -0
  97. package/modern/locales/koKR.js +2 -1
  98. package/modern/locales/nbNO.js +1 -0
  99. package/modern/locales/nlNL.js +1 -0
  100. package/modern/locales/nnNO.js +1 -0
  101. package/modern/locales/plPL.js +1 -0
  102. package/modern/locales/ptBR.js +1 -0
  103. package/modern/locales/ptPT.js +1 -0
  104. package/modern/locales/roRO.js +1 -0
  105. package/modern/locales/ruRU.js +1 -0
  106. package/modern/locales/skSK.js +7 -7
  107. package/modern/locales/svSE.js +1 -0
  108. package/modern/locales/trTR.js +1 -0
  109. package/modern/locales/ukUA.js +1 -0
  110. package/modern/locales/urPK.js +1 -0
  111. package/modern/locales/viVN.js +1 -0
  112. package/modern/locales/zhCN.js +1 -0
  113. package/modern/locales/zhHK.js +11 -11
  114. package/modern/locales/zhTW.js +10 -10
  115. package/node/components/cell/GridActionsCell.js +3 -1
  116. package/node/components/cell/GridCell.js +2 -2
  117. package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -1
  118. package/node/components/containers/GridRootStyles.js +3 -3
  119. package/node/components/panel/filterPanel/index.js +7 -11
  120. package/node/components/virtualization/GridBottomContainer.js +1 -1
  121. package/node/components/virtualization/GridTopContainer.js +1 -1
  122. package/node/components/virtualization/GridVirtualScrollbar.js +9 -3
  123. package/node/constants/localeTextConstants.js +1 -0
  124. package/node/hooks/features/editing/useGridRowEditing.js +19 -10
  125. package/node/hooks/features/export/useGridPrintExport.js +4 -4
  126. package/node/hooks/features/filter/useGridFilter.js +5 -0
  127. package/node/hooks/features/rowSelection/useGridRowSelection.js +55 -19
  128. package/node/hooks/features/rowSelection/utils.js +7 -5
  129. package/node/hooks/features/rows/useGridRowsMeta.js +8 -0
  130. package/node/hooks/features/virtualization/useGridVirtualScroller.js +0 -2
  131. package/node/index.js +1 -1
  132. package/node/locales/arSD.js +1 -0
  133. package/node/locales/beBY.js +1 -0
  134. package/node/locales/bgBG.js +1 -0
  135. package/node/locales/bnBD.js +1 -0
  136. package/node/locales/csCZ.js +6 -6
  137. package/node/locales/daDK.js +1 -0
  138. package/node/locales/deDE.js +1 -0
  139. package/node/locales/elGR.js +1 -0
  140. package/node/locales/esES.js +1 -0
  141. package/node/locales/faIR.js +1 -0
  142. package/node/locales/fiFI.js +1 -0
  143. package/node/locales/frFR.js +1 -0
  144. package/node/locales/heIL.js +1 -0
  145. package/node/locales/hrHR.js +1 -0
  146. package/node/locales/huHU.js +1 -0
  147. package/node/locales/isIS.js +1 -0
  148. package/node/locales/itIT.js +1 -0
  149. package/node/locales/jaJP.js +1 -0
  150. package/node/locales/koKR.js +2 -1
  151. package/node/locales/nbNO.js +1 -0
  152. package/node/locales/nlNL.js +1 -0
  153. package/node/locales/nnNO.js +1 -0
  154. package/node/locales/plPL.js +1 -0
  155. package/node/locales/ptBR.js +1 -0
  156. package/node/locales/ptPT.js +1 -0
  157. package/node/locales/roRO.js +1 -0
  158. package/node/locales/ruRU.js +1 -0
  159. package/node/locales/skSK.js +7 -7
  160. package/node/locales/svSE.js +1 -0
  161. package/node/locales/trTR.js +1 -0
  162. package/node/locales/ukUA.js +1 -0
  163. package/node/locales/urPK.js +1 -0
  164. package/node/locales/viVN.js +1 -0
  165. package/node/locales/zhCN.js +1 -0
  166. package/node/locales/zhHK.js +11 -11
  167. package/node/locales/zhTW.js +10 -10
  168. package/package.json +5 -5
@@ -96,6 +96,7 @@ const ptPTGrid = {
96
96
  filterValueFalse: 'falso',
97
97
  // Column menu text
98
98
  columnMenuLabel: 'Menu',
99
+ // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
99
100
  columnMenuShowColumns: 'Mostrar colunas',
100
101
  columnMenuManageColumns: 'Gerir colunas',
101
102
  columnMenuFilter: 'Filtro',
@@ -96,6 +96,7 @@ const roROGrid = {
96
96
  filterValueFalse: 'Nu',
97
97
  // Column menu text
98
98
  columnMenuLabel: 'Meniu',
99
+ // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
99
100
  columnMenuShowColumns: 'Afișează toate coloanele',
100
101
  columnMenuManageColumns: 'Gestionează coloane',
101
102
  columnMenuFilter: 'Filtru',
@@ -111,6 +111,7 @@ const ruRUGrid = {
111
111
  filterValueFalse: 'ложь',
112
112
  // Column menu text
113
113
  columnMenuLabel: 'Меню',
114
+ // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
114
115
  columnMenuShowColumns: 'Показать столбцы',
115
116
  columnMenuManageColumns: 'Управление колонками',
116
117
  columnMenuFilter: 'Фильтр',
@@ -41,9 +41,8 @@ const skSKGrid = {
41
41
  columnsManagementSearchTitle: 'Vyhľadať',
42
42
  columnsManagementNoColumns: 'Žiadne stĺpce',
43
43
  columnsManagementShowHideAllText: 'Zobraziť/Skryť všetko',
44
- // columnsManagementReset: 'Reset',
45
- // columnsManagementDeleteIconLabel: 'Clear',
46
-
44
+ columnsManagementReset: 'Resetovať',
45
+ columnsManagementDeleteIconLabel: 'Vymazať',
47
46
  // Filter panel text
48
47
  filterPanelAddFilter: 'Pridať filter',
49
48
  filterPanelRemoveAll: 'Odstrániť všetky',
@@ -57,9 +56,9 @@ const skSKGrid = {
57
56
  filterPanelInputPlaceholder: 'Hodnota filtra',
58
57
  // Filter operators text
59
58
  filterOperatorContains: 'obsahuje',
60
- // filterOperatorDoesNotContain: 'does not contain',
59
+ filterOperatorDoesNotContain: 'neobsahuje',
61
60
  filterOperatorEquals: 'rovná sa',
62
- // filterOperatorDoesNotEqual: 'does not equal',
61
+ filterOperatorDoesNotEqual: 'nerovná sa',
63
62
  filterOperatorStartsWith: 'začína s',
64
63
  filterOperatorEndsWith: 'končí na',
65
64
  filterOperatorIs: 'je',
@@ -79,9 +78,9 @@ const skSKGrid = {
79
78
  'filterOperator<=': '<=',
80
79
  // Header filter operators text
81
80
  headerFilterOperatorContains: 'Obsahuje',
82
- // headerFilterOperatorDoesNotContain: 'Does not contain',
81
+ headerFilterOperatorDoesNotContain: 'Neobsahuje',
83
82
  headerFilterOperatorEquals: 'Rovná sa',
84
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
83
+ headerFilterOperatorDoesNotEqual: 'Nerovná sa',
85
84
  headerFilterOperatorStartsWith: 'Začína s',
86
85
  headerFilterOperatorEndsWith: 'Končí na',
87
86
  headerFilterOperatorIs: 'Je',
@@ -105,6 +104,7 @@ const skSKGrid = {
105
104
  filterValueFalse: 'nie',
106
105
  // Column menu text
107
106
  columnMenuLabel: 'Menu',
107
+ columnMenuAriaLabel: columnName => `Ponuka stĺpca ${columnName}`,
108
108
  columnMenuShowColumns: 'Zobraziť stĺpce',
109
109
  columnMenuManageColumns: 'Spravovať stĺpce',
110
110
  columnMenuFilter: 'Filter',
@@ -97,6 +97,7 @@ const svSEGrid = {
97
97
  filterValueFalse: 'falskt',
98
98
  // Column menu text
99
99
  columnMenuLabel: 'Meny',
100
+ // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
100
101
  columnMenuShowColumns: 'Visa kolumner',
101
102
  columnMenuManageColumns: 'Hantera kolumner',
102
103
  columnMenuFilter: 'Filtrera',
@@ -96,6 +96,7 @@ const trTRGrid = {
96
96
  filterValueFalse: 'yanlış',
97
97
  // Column menu text
98
98
  columnMenuLabel: 'Menü',
99
+ // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
99
100
  columnMenuShowColumns: 'Sütunları göster',
100
101
  columnMenuManageColumns: 'Sütunları yönet',
101
102
  columnMenuFilter: 'Filtre Ekle',
@@ -111,6 +111,7 @@ const ukUAGrid = {
111
111
  filterValueFalse: 'ні',
112
112
  // Column menu text
113
113
  columnMenuLabel: 'Меню',
114
+ // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
114
115
  columnMenuShowColumns: 'Показати стовпці',
115
116
  columnMenuManageColumns: 'Керування стовпцями',
116
117
  columnMenuFilter: 'Фільтр',
@@ -96,6 +96,7 @@ const urPKGrid = {
96
96
  filterValueFalse: 'غلط',
97
97
  // Column menu text
98
98
  columnMenuLabel: 'مینیو',
99
+ // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
99
100
  columnMenuShowColumns: 'کالم دکھائیں',
100
101
  columnMenuManageColumns: 'کالم مینج کریں',
101
102
  columnMenuFilter: 'فلٹر',
@@ -97,6 +97,7 @@ const viVNGrid = {
97
97
  filterValueFalse: 'Không',
98
98
  // Column menu text
99
99
  columnMenuLabel: 'Danh mục',
100
+ // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
100
101
  columnMenuShowColumns: 'Danh sách cột',
101
102
  columnMenuManageColumns: 'Quản lý cột',
102
103
  columnMenuFilter: 'Bộ lọc',
@@ -96,6 +96,7 @@ const zhCNGrid = {
96
96
  filterValueFalse: '假',
97
97
  // Column menu text
98
98
  columnMenuLabel: '菜单',
99
+ columnMenuAriaLabel: columnName => `${columnName} 列菜单`,
99
100
  columnMenuShowColumns: '显示',
100
101
  columnMenuManageColumns: '管理列',
101
102
  columnMenuFilter: '筛选器',
@@ -30,12 +30,11 @@ const zhHKGrid = {
30
30
  toolbarExportPrint: '列印',
31
31
  toolbarExportExcel: '下載為 Excel',
32
32
  // Columns management text
33
- // columnsManagementSearchTitle: 'Search',
34
- // columnsManagementNoColumns: 'No columns',
35
- // columnsManagementShowHideAllText: 'Show/Hide All',
36
- // columnsManagementReset: 'Reset',
37
- // columnsManagementDeleteIconLabel: 'Clear',
38
-
33
+ columnsManagementSearchTitle: '搜尋',
34
+ columnsManagementNoColumns: '沒有列',
35
+ columnsManagementShowHideAllText: '顯示/隱藏所有',
36
+ columnsManagementReset: '重置',
37
+ columnsManagementDeleteIconLabel: '清除',
39
38
  // Filter panel text
40
39
  filterPanelAddFilter: '新增過濾器',
41
40
  filterPanelRemoveAll: '移除所有',
@@ -49,9 +48,9 @@ const zhHKGrid = {
49
48
  filterPanelInputPlaceholder: '過濾值',
50
49
  // Filter operators text
51
50
  filterOperatorContains: '包含',
52
- // filterOperatorDoesNotContain: 'does not contain',
51
+ filterOperatorDoesNotContain: '不包含',
53
52
  filterOperatorEquals: '等於',
54
- // filterOperatorDoesNotEqual: 'does not equal',
53
+ filterOperatorDoesNotEqual: '不等於',
55
54
  filterOperatorStartsWith: '以。。開始',
56
55
  filterOperatorEndsWith: '以。。結束',
57
56
  filterOperatorIs: '是',
@@ -71,9 +70,9 @@ const zhHKGrid = {
71
70
  'filterOperator<=': '<=',
72
71
  // Header filter operators text
73
72
  headerFilterOperatorContains: '包含',
74
- // headerFilterOperatorDoesNotContain: 'Does not contain',
73
+ headerFilterOperatorDoesNotContain: '不包含',
75
74
  headerFilterOperatorEquals: '等於',
76
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
75
+ headerFilterOperatorDoesNotEqual: '不等於',
77
76
  headerFilterOperatorStartsWith: '以。。開始',
78
77
  headerFilterOperatorEndsWith: '以。。結束',
79
78
  headerFilterOperatorIs: '是',
@@ -87,7 +86,7 @@ const zhHKGrid = {
87
86
  headerFilterOperatorIsAnyOf: '是以下任一個',
88
87
  'headerFilterOperator=': '等於',
89
88
  'headerFilterOperator!=': '不等於',
90
- 'headerFilterOperator>': '比...更棒',
89
+ 'headerFilterOperator>': '大於',
91
90
  'headerFilterOperator>=': '大於或等於',
92
91
  'headerFilterOperator<': '少於',
93
92
  'headerFilterOperator<=': '小於或等於',
@@ -97,6 +96,7 @@ const zhHKGrid = {
97
96
  filterValueFalse: '錯誤的',
98
97
  // Column menu text
99
98
  columnMenuLabel: '選單',
99
+ columnMenuAriaLabel: columnName => `${columnName} 欄目選單`,
100
100
  columnMenuShowColumns: '顯示欄目',
101
101
  columnMenuManageColumns: '管理欄目',
102
102
  columnMenuFilter: '篩選',
@@ -30,12 +30,11 @@ const zhTWGrid = {
30
30
  toolbarExportPrint: '列印',
31
31
  toolbarExportExcel: '匯出 Excel',
32
32
  // Columns management text
33
- // columnsManagementSearchTitle: 'Search',
34
- // columnsManagementNoColumns: 'No columns',
35
- // columnsManagementShowHideAllText: 'Show/Hide All',
36
- // columnsManagementReset: 'Reset',
37
- // columnsManagementDeleteIconLabel: 'Clear',
38
-
33
+ columnsManagementSearchTitle: '搜尋',
34
+ columnsManagementNoColumns: '沒有欄位',
35
+ columnsManagementShowHideAllText: '顯示/隱藏所有',
36
+ columnsManagementReset: '重置',
37
+ columnsManagementDeleteIconLabel: '清除',
39
38
  // Filter panel text
40
39
  filterPanelAddFilter: '增加篩選器',
41
40
  filterPanelRemoveAll: '清除所有',
@@ -49,9 +48,9 @@ const zhTWGrid = {
49
48
  filterPanelInputPlaceholder: '篩選值',
50
49
  // Filter operators text
51
50
  filterOperatorContains: '包含',
52
- // filterOperatorDoesNotContain: 'does not contain',
51
+ filterOperatorDoesNotContain: '不包含',
53
52
  filterOperatorEquals: '等於',
54
- // filterOperatorDoesNotEqual: 'does not equal',
53
+ filterOperatorDoesNotEqual: '不等於',
55
54
  filterOperatorStartsWith: '以...開頭',
56
55
  filterOperatorEndsWith: '以...結束',
57
56
  filterOperatorIs: '為',
@@ -71,9 +70,9 @@ const zhTWGrid = {
71
70
  'filterOperator<=': '<=',
72
71
  // Header filter operators text
73
72
  headerFilterOperatorContains: '包含',
74
- // headerFilterOperatorDoesNotContain: 'Does not contain',
73
+ headerFilterOperatorDoesNotContain: '不包含',
75
74
  headerFilterOperatorEquals: '等於',
76
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
75
+ headerFilterOperatorDoesNotEqual: '不等於',
77
76
  headerFilterOperatorStartsWith: '以...開頭',
78
77
  headerFilterOperatorEndsWith: '以...結束',
79
78
  headerFilterOperatorIs: '為',
@@ -97,6 +96,7 @@ const zhTWGrid = {
97
96
  filterValueFalse: '假',
98
97
  // Column menu text
99
98
  columnMenuLabel: '選單',
99
+ columnMenuAriaLabel: columnName => `${columnName} 欄位選單`,
100
100
  columnMenuShowColumns: '顯示欄位',
101
101
  columnMenuManageColumns: '管理欄位',
102
102
  columnMenuFilter: '篩選器',
@@ -99,7 +99,9 @@ function GridActionsCell(props) {
99
99
  const hideMenu = () => {
100
100
  setOpen(false);
101
101
  };
102
- const toggleMenu = () => {
102
+ const toggleMenu = event => {
103
+ event.stopPropagation();
104
+ event.preventDefault();
103
105
  if (open) {
104
106
  hideMenu();
105
107
  } else {
@@ -201,9 +201,9 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
201
201
  const isRightPinned = pinnedPosition === _constants.PinnedColumnPosition.RIGHT;
202
202
  if (rowSpan > 1) {
203
203
  cellStyle.height = `calc(var(--height) * ${rowSpan})`;
204
- cellStyle.zIndex = 5;
204
+ cellStyle.zIndex = 10;
205
205
  if (isLeftPinned || isRightPinned) {
206
- cellStyle.zIndex = 6;
206
+ cellStyle.zIndex = 40;
207
207
  }
208
208
  }
209
209
  return cellStyle;
@@ -43,6 +43,7 @@ const ColumnHeaderMenuIcon = exports.ColumnHeaderMenuIcon = /*#__PURE__*/React.m
43
43
  event.stopPropagation();
44
44
  apiRef.current.toggleColumnMenu(colDef.field);
45
45
  }, [apiRef, colDef.field]);
46
+ const columnName = colDef.headerName ?? colDef.field;
46
47
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
47
48
  className: classes.root,
48
49
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseTooltip, (0, _extends2.default)({
@@ -53,7 +54,7 @@ const ColumnHeaderMenuIcon = exports.ColumnHeaderMenuIcon = /*#__PURE__*/React.m
53
54
  ref: iconButtonRef,
54
55
  tabIndex: -1,
55
56
  className: classes.button,
56
- "aria-label": apiRef.current.getLocaleText('columnMenuLabel'),
57
+ "aria-label": apiRef.current.getLocaleText('columnMenuAriaLabel')(columnName),
57
58
  size: "small",
58
59
  onClick: handleMenuIconClick,
59
60
  "aria-haspopup": "menu",
@@ -492,14 +492,14 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
492
492
  },
493
493
  [`& .${_gridClasses.gridClasses['columnHeader--pinnedLeft']}, & .${_gridClasses.gridClasses['columnHeader--pinnedRight']}`]: {
494
494
  position: 'sticky',
495
- zIndex: 4,
495
+ zIndex: 40,
496
496
  // Should be above the column separator
497
497
  background: 'var(--DataGrid-pinnedBackground)'
498
498
  },
499
499
  [`& .${_gridClasses.gridClasses.columnSeparator}`]: {
500
500
  position: 'absolute',
501
501
  overflow: 'hidden',
502
- zIndex: 3,
502
+ zIndex: 30,
503
503
  display: 'flex',
504
504
  flexDirection: 'column',
505
505
  justifyContent: 'center',
@@ -739,7 +739,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
739
739
  },
740
740
  [`& .${_gridClasses.gridClasses['cell--pinnedLeft']}, & .${_gridClasses.gridClasses['cell--pinnedRight']}`]: {
741
741
  position: 'sticky',
742
- zIndex: 3,
742
+ zIndex: 30,
743
743
  background: 'var(--DataGrid-pinnedBackground)',
744
744
  '&.Mui-selected': {
745
745
  backgroundColor: pinnedSelectedBackgroundColor
@@ -4,8 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
+ GridFilterInputValue: true,
7
8
  GridFilterPanel: true
8
9
  };
10
+ Object.defineProperty(exports, "GridFilterInputValue", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _GridFilterInputValue.GridFilterInputValue;
14
+ }
15
+ });
9
16
  Object.defineProperty(exports, "GridFilterPanel", {
10
17
  enumerable: true,
11
18
  get: function () {
@@ -25,17 +32,6 @@ Object.keys(_GridFilterForm).forEach(function (key) {
25
32
  });
26
33
  });
27
34
  var _GridFilterInputValue = require("./GridFilterInputValue");
28
- Object.keys(_GridFilterInputValue).forEach(function (key) {
29
- if (key === "default" || key === "__esModule") return;
30
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
- if (key in exports && exports[key] === _GridFilterInputValue[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _GridFilterInputValue[key];
36
- }
37
- });
38
- });
39
35
  var _GridFilterInputDate = require("./GridFilterInputDate");
40
36
  Object.keys(_GridFilterInputDate).forEach(function (key) {
41
37
  if (key === "default" || key === "__esModule") return;
@@ -21,7 +21,7 @@ const useUtilityClasses = () => {
21
21
  };
22
22
  const Element = (0, _system.styled)('div')({
23
23
  position: 'sticky',
24
- zIndex: 4,
24
+ zIndex: 40,
25
25
  bottom: 'calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))'
26
26
  });
27
27
  function GridBottomContainer(props) {
@@ -21,7 +21,7 @@ const useUtilityClasses = () => {
21
21
  };
22
22
  const Element = (0, _system.styled)('div')({
23
23
  position: 'sticky',
24
- zIndex: 4,
24
+ zIndex: 40,
25
25
  top: 0
26
26
  });
27
27
  function GridTopContainer(props) {
@@ -28,9 +28,9 @@ const useUtilityClasses = (ownerState, position) => {
28
28
  const Scrollbar = (0, _system.styled)('div')({
29
29
  position: 'absolute',
30
30
  display: 'inline-block',
31
- zIndex: 6,
31
+ zIndex: 60,
32
32
  '&:hover': {
33
- zIndex: 7
33
+ zIndex: 70
34
34
  },
35
35
  // In macOS Safari and Gnome Web, scrollbars are overlaid and don't affect the layout. So we consider
36
36
  // their size to be 0px throughout all the calculations, but the floating scrollbar container does need
@@ -137,7 +137,13 @@ const GridVirtualScrollbar = exports.GridVirtualScrollbar = (0, _forwardRef.forw
137
137
  top: 0
138
138
  } : undefined,
139
139
  tabIndex: -1,
140
- "aria-hidden": "true",
140
+ "aria-hidden": "true"
141
+ // tabIndex does not prevent focus with a mouse click, throwing a console error
142
+ // https://github.com/mui/mui-x/issues/16706
143
+ ,
144
+ onFocus: event => {
145
+ event.target.blur();
146
+ },
141
147
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
142
148
  ref: contentRef,
143
149
  className: classes.content
@@ -100,6 +100,7 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
100
100
  filterValueFalse: 'false',
101
101
  // Column menu text
102
102
  columnMenuLabel: 'Menu',
103
+ columnMenuAriaLabel: columnName => `${columnName} column menu`,
103
104
  columnMenuShowColumns: 'Show columns',
104
105
  columnMenuManageColumns: 'Manage columns',
105
106
  columnMenuFilter: 'Filter',
@@ -29,6 +29,7 @@ const useGridRowEditing = (apiRef, props) => {
29
29
  const [rowModesModel, setRowModesModel] = React.useState({});
30
30
  const rowModesModelRef = React.useRef(rowModesModel);
31
31
  const prevRowModesModel = React.useRef({});
32
+ const prevRowValuesLookup = React.useRef({});
32
33
  const focusTimeout = React.useRef(undefined);
33
34
  const nextFocusedCell = React.useRef(null);
34
35
  const {
@@ -319,6 +320,7 @@ const useGridRowEditing = (apiRef, props) => {
319
320
  deleteValue,
320
321
  initialValue
321
322
  } = params;
323
+ const row = apiRef.current.getRow(id);
322
324
  const columnFields = (0, _gridColumnsSelector.gridColumnFieldsSelector)(apiRef);
323
325
  const newProps = columnFields.reduce((acc, field) => {
324
326
  const cellParams = apiRef.current.getCellParams(id, field);
@@ -341,6 +343,7 @@ const useGridRowEditing = (apiRef, props) => {
341
343
  };
342
344
  return acc;
343
345
  }, {});
346
+ prevRowValuesLookup.current[id] = row;
344
347
  updateOrDeleteRowState(id, newProps);
345
348
  if (fieldToFocus) {
346
349
  apiRef.current.setCellFocus(id, fieldToFocus);
@@ -351,7 +354,7 @@ const useGridRowEditing = (apiRef, props) => {
351
354
  const newValue = deleteValue ? (0, _utils3.getDefaultCellValue)(column) : initialValue ?? value;
352
355
  Promise.resolve(column.preProcessEditCellProps({
353
356
  id,
354
- row: apiRef.current.getRow(id),
357
+ row,
355
358
  props: newProps[field],
356
359
  hasChanged: newValue !== value
357
360
  })).then(processedProps => {
@@ -390,13 +393,14 @@ const useGridRowEditing = (apiRef, props) => {
390
393
  }
391
394
  updateOrDeleteRowState(id, null);
392
395
  updateRowInRowModesModel(id, null);
396
+ delete prevRowValuesLookup.current[id];
393
397
  };
394
398
  if (ignoreModifications) {
395
399
  finishRowEditMode();
396
400
  return;
397
401
  }
398
402
  const editingState = (0, _gridEditingSelectors.gridEditRowsStateSelector)(apiRef.current.state);
399
- const row = apiRef.current.getRow(id);
403
+ const row = prevRowValuesLookup.current[id];
400
404
  const isSomeFieldProcessingProps = Object.values(editingState[id]).some(fieldProps => fieldProps.isProcessingProps);
401
405
  if (isSomeFieldProcessingProps) {
402
406
  prevRowModesModel.current[id].mode = _gridEditRowModel.GridRowModes.Edit;
@@ -410,14 +414,17 @@ const useGridRowEditing = (apiRef, props) => {
410
414
  });
411
415
  return;
412
416
  }
413
- const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromRowEditing(id);
417
+ const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromRowEditing(row.id);
414
418
  if (processRowUpdate) {
415
419
  const handleError = errorThrown => {
416
- prevRowModesModel.current[id].mode = _gridEditRowModel.GridRowModes.Edit;
417
- // Revert the mode in the rowModesModel prop back to "edit"
418
- updateRowInRowModesModel(id, {
419
- mode: _gridEditRowModel.GridRowModes.Edit
420
- });
420
+ // The row might have been deleted
421
+ if (prevRowModesModel.current[id]) {
422
+ prevRowModesModel.current[id].mode = _gridEditRowModel.GridRowModes.Edit;
423
+ // Revert the mode in the rowModesModel prop back to "edit"
424
+ updateRowInRowModesModel(id, {
425
+ mode: _gridEditRowModel.GridRowModes.Edit
426
+ });
427
+ }
421
428
  if (onProcessRowUpdateError) {
422
429
  onProcessRowUpdateError(errorThrown);
423
430
  } else if (process.env.NODE_ENV !== 'production') {
@@ -548,10 +555,12 @@ const useGridRowEditing = (apiRef, props) => {
548
555
  if (!editingState[id]) {
549
556
  return apiRef.current.getRow(id);
550
557
  }
551
- let rowUpdate = (0, _extends2.default)({}, row);
558
+ let rowUpdate = (0, _extends2.default)({}, prevRowValuesLookup.current[id], row);
552
559
  Object.entries(editingState[id]).forEach(([field, fieldProps]) => {
553
560
  const column = apiRef.current.getColumn(field);
554
- if (column.valueSetter) {
561
+ // Column might have been removed
562
+ // see https://github.com/mui/mui-x/pull/16888
563
+ if (column?.valueSetter) {
555
564
  rowUpdate = column.valueSetter(fieldProps.value, rowUpdate, column, apiRef);
556
565
  } else {
557
566
  rowUpdate[field] = fieldProps.value;
@@ -114,12 +114,13 @@ const useGridPrintExport = (apiRef, props) => {
114
114
  gridClone.style.contain = 'size';
115
115
  let gridToolbarElementHeight = gridRootElement.querySelector(`.${_gridClasses.gridClasses.toolbarContainer}`)?.offsetHeight || 0;
116
116
  let gridFooterElementHeight = gridRootElement.querySelector(`.${_gridClasses.gridClasses.footerContainer}`)?.offsetHeight || 0;
117
+ const gridFooterElement = gridClone.querySelector(`.${_gridClasses.gridClasses.footerContainer}`);
117
118
  if (normalizeOptions.hideToolbar) {
118
119
  gridClone.querySelector(`.${_gridClasses.gridClasses.toolbarContainer}`)?.remove();
119
120
  gridToolbarElementHeight = 0;
120
121
  }
121
- if (normalizeOptions.hideFooter) {
122
- gridClone.querySelector(`.${_gridClasses.gridClasses.footerContainer}`)?.remove();
122
+ if (normalizeOptions.hideFooter && gridFooterElement) {
123
+ gridFooterElement.remove();
123
124
  gridFooterElementHeight = 0;
124
125
  }
125
126
 
@@ -128,11 +129,10 @@ const useGridPrintExport = (apiRef, props) => {
128
129
  gridClone.style.height = `${computedTotalHeight}px`;
129
130
  // The height above does not include grid border width, so we need to exclude it
130
131
  gridClone.style.boxSizing = 'content-box';
131
- if (!normalizeOptions.hideFooter) {
132
+ if (!normalizeOptions.hideFooter && gridFooterElement) {
132
133
  // the footer is always being placed at the bottom of the page as if all rows are exported
133
134
  // so if getRowsToExport is being used to only export a subset of rows then we need to
134
135
  // adjust the footer position to be correctly placed at the bottom of the grid
135
- const gridFooterElement = gridClone.querySelector(`.${_gridClasses.gridClasses.footerContainer}`);
136
136
  gridFooterElement.style.position = 'absolute';
137
137
  gridFooterElement.style.width = '100%';
138
138
  gridFooterElement.style.top = `${computedTotalHeight - gridFooterElementHeight}px`;
@@ -237,6 +237,11 @@ const useGridFilter = (apiRef, props) => {
237
237
  */
238
238
  const stateExportPreProcessing = React.useCallback((prevState, context) => {
239
239
  const filterModelToExport = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
240
+
241
+ // Remove the additional `fromInput` property from the filter model
242
+ filterModelToExport.items.forEach(item => {
243
+ delete item.fromInput;
244
+ });
240
245
  const shouldExportFilterModel =
241
246
  // Always export if the `exportOnlyDirtyModels` property is not activated
242
247
  !context.exportOnlyDirtyModels ||