@mui/x-data-grid 7.1.0 → 7.2.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 (103) hide show
  1. package/CHANGELOG.md +261 -4
  2. package/README.md +1 -1
  3. package/components/GridRow.js +3 -1
  4. package/components/cell/GridCell.d.ts +1 -0
  5. package/components/cell/GridCell.js +4 -3
  6. package/components/columnHeaders/GridColumnGroupHeader.d.ts +1 -0
  7. package/components/columnHeaders/GridColumnGroupHeader.js +3 -2
  8. package/components/columnHeaders/GridColumnHeaderItem.d.ts +1 -0
  9. package/components/columnHeaders/GridColumnHeaderItem.js +4 -2
  10. package/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
  11. package/components/containers/GridRootStyles.js +5 -3
  12. package/components/panel/filterPanel/GridFilterInputDate.js +5 -1
  13. package/components/virtualization/GridMainContainer.js +8 -1
  14. package/components/virtualization/GridTopContainer.js +1 -0
  15. package/constants/gridClasses.d.ts +5 -0
  16. package/constants/gridClasses.js +1 -1
  17. package/hooks/core/useGridInitialization.js +1 -1
  18. package/hooks/core/useGridStateInitialization.d.ts +1 -2
  19. package/hooks/core/useGridStateInitialization.js +6 -10
  20. package/hooks/features/columnHeaders/useGridColumnHeaders.js +7 -3
  21. package/hooks/features/editing/useGridCellEditing.js +3 -1
  22. package/hooks/features/editing/useGridRowEditing.js +3 -1
  23. package/hooks/features/export/serializers/csvSerializer.js +6 -5
  24. package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
  25. package/hooks/features/headerFiltering/useGridHeaderFiltering.js +4 -7
  26. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
  27. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -3
  28. package/hooks/features/virtualization/useGridVirtualScroller.js +17 -6
  29. package/index.js +1 -1
  30. package/internals/index.d.ts +1 -1
  31. package/internals/utils/propValidation.d.ts +1 -0
  32. package/internals/utils/propValidation.js +9 -4
  33. package/locales/deDE.js +3 -4
  34. package/locales/esES.js +3 -4
  35. package/locales/faIR.js +3 -4
  36. package/locales/frFR.js +5 -6
  37. package/locales/ptBR.js +3 -4
  38. package/locales/svSE.js +3 -4
  39. package/models/api/gridCallbackDetails.d.ts +5 -0
  40. package/models/gridExport.d.ts +2 -2
  41. package/models/gridFilterModel.d.ts +3 -3
  42. package/models/params/gridCellParams.d.ts +0 -22
  43. package/models/props/DataGridProps.d.ts +19 -0
  44. package/modern/components/GridRow.js +3 -1
  45. package/modern/components/cell/GridCell.js +4 -3
  46. package/modern/components/columnHeaders/GridColumnGroupHeader.js +3 -2
  47. package/modern/components/columnHeaders/GridColumnHeaderItem.js +4 -2
  48. package/modern/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
  49. package/modern/components/containers/GridRootStyles.js +5 -3
  50. package/modern/components/panel/filterPanel/GridFilterInputDate.js +5 -1
  51. package/modern/components/virtualization/GridMainContainer.js +8 -1
  52. package/modern/components/virtualization/GridTopContainer.js +1 -0
  53. package/modern/constants/gridClasses.js +1 -1
  54. package/modern/hooks/core/useGridInitialization.js +1 -1
  55. package/modern/hooks/core/useGridStateInitialization.js +6 -10
  56. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +7 -3
  57. package/modern/hooks/features/editing/useGridCellEditing.js +3 -1
  58. package/modern/hooks/features/editing/useGridRowEditing.js +3 -1
  59. package/modern/hooks/features/export/serializers/csvSerializer.js +6 -5
  60. package/modern/hooks/features/headerFiltering/useGridHeaderFiltering.js +4 -7
  61. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -3
  62. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +17 -6
  63. package/modern/index.js +1 -1
  64. package/modern/internals/utils/propValidation.js +9 -4
  65. package/modern/locales/deDE.js +3 -4
  66. package/modern/locales/esES.js +3 -4
  67. package/modern/locales/faIR.js +3 -4
  68. package/modern/locales/frFR.js +5 -6
  69. package/modern/locales/ptBR.js +3 -4
  70. package/modern/locales/svSE.js +3 -4
  71. package/modern/utils/cellBorderUtils.js +15 -2
  72. package/node/components/GridRow.js +3 -1
  73. package/node/components/cell/GridCell.js +4 -3
  74. package/node/components/columnHeaders/GridColumnGroupHeader.js +3 -2
  75. package/node/components/columnHeaders/GridColumnHeaderItem.js +4 -2
  76. package/node/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
  77. package/node/components/containers/GridRootStyles.js +5 -3
  78. package/node/components/panel/filterPanel/GridFilterInputDate.js +5 -1
  79. package/node/components/virtualization/GridMainContainer.js +8 -1
  80. package/node/components/virtualization/GridTopContainer.js +1 -0
  81. package/node/constants/gridClasses.js +1 -1
  82. package/node/hooks/core/useGridInitialization.js +1 -1
  83. package/node/hooks/core/useGridStateInitialization.js +6 -10
  84. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +7 -3
  85. package/node/hooks/features/editing/useGridCellEditing.js +3 -1
  86. package/node/hooks/features/editing/useGridRowEditing.js +3 -1
  87. package/node/hooks/features/export/serializers/csvSerializer.js +6 -5
  88. package/node/hooks/features/headerFiltering/useGridHeaderFiltering.js +4 -7
  89. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -3
  90. package/node/hooks/features/virtualization/useGridVirtualScroller.js +17 -6
  91. package/node/index.js +1 -1
  92. package/node/internals/utils/propValidation.js +12 -6
  93. package/node/locales/deDE.js +3 -4
  94. package/node/locales/esES.js +3 -4
  95. package/node/locales/faIR.js +3 -4
  96. package/node/locales/frFR.js +5 -6
  97. package/node/locales/ptBR.js +3 -4
  98. package/node/locales/svSE.js +3 -4
  99. package/node/utils/cellBorderUtils.js +15 -2
  100. package/package.json +2 -2
  101. package/themeAugmentation/overrides.d.ts +6 -0
  102. package/utils/cellBorderUtils.d.ts +1 -1
  103. package/utils/cellBorderUtils.js +15 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,193 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.2.0
7
+
8
+ _Apr 12, 2024_
9
+
10
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🎨 Make grid colors customizable through the MUI themes API
13
+ - 🌍 Improve French (fr-FR), German (de-DE), and Swedish (sv-SE) locales on the Data Grid and Pickers
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@7.2.0`
20
+
21
+ - [DataGrid] Add missing `api` property to `GridCallbackDetails` (#12742) @sai6855
22
+ - [DataGrid] Do not escape double quotes when copying to clipboard (#12722) @cherniavskii
23
+ - [DataGrid] Fix column vertical border (#12741) @romgrk
24
+ - [DataGrid] Fix invalid date error when filtering `date`/`dateTime` columns (#12709) @cherniavskii
25
+ - [DataGrid] Fix overflow with dynamic row height (#12683) @romgrk
26
+ - [DataGrid] Make colors customizable (#12614) @romgrk
27
+ - [l10n] Improve French (fr-FR) locale (#12755) @derek-0000
28
+ - [l10n] Improve German (de-DE) locale (#12752) @Jens-Schoen
29
+ - [l10n] Improve Swedish (sv-SE) locale (#12731) @pontusdacke
30
+
31
+ #### `@mui/x-data-grid-pro@7.2.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
32
+
33
+ Same changes as in `@mui/x-data-grid@7.2.0`.
34
+
35
+ #### `@mui/x-data-grid-premium@7.2.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
36
+
37
+ Same changes as in `@mui/x-data-grid-pro@7.2.0`, plus:
38
+
39
+ - [DataGridPremium] Fix clipboard paste not working when cell loses focus (#12724) @cherniavskii
40
+
41
+ ### Date and Time Pickers
42
+
43
+ #### `@mui/x-date-pickers@7.2.0`
44
+
45
+ - [fields] Fix field editing after closing the picker (#12675) @LukasTy
46
+ - [l10n] Improve French (fr-FR) locale (#12692) @FaroukBel
47
+ - [l10n] Improve German (de-DE) locale (#12752) @Jens-Schoen
48
+ - [l10n] Improve Swedish (sv-SE) locale (#12731) @pontusdacke
49
+ - [pickers] Fix desktop date time Pickers grid layout (#12748) @LukasTy
50
+
51
+ #### `@mui/x-date-pickers-pro@7.2.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
52
+
53
+ Same changes as in `@mui/x-date-pickers@7.2.0`, plus:
54
+
55
+ - [DateTimeRangePicker] Fix desktop toolbar style (#12760) @LukasTy
56
+
57
+ ### Charts
58
+
59
+ #### `@mui/x-charts@7.2.0`
60
+
61
+ - [charts] Fix Bar chart with empty dataset throwing an error (#12708) @JCQuintas
62
+ - [charts] Fix `tickLabelInterval` not working on `YAxis` (#12746) @JCQuintas
63
+
64
+ ### Tree View
65
+
66
+ #### `@mui/x-tree-view@7.2.0`
67
+
68
+ - [TreeView] Add a new lookup to access an item index without expansive computation (#12729) @flaviendelangle
69
+ - [TreeView] Clean up usage of term "node" in internals (#12655) @noraleonte
70
+ - [TreeView] Improve performance by removing `getNavigableChildrenIds` method (#12713) @flaviendelangle
71
+ - [TreeView] Remove `state.items.itemTree` (#12717) @flaviendelangle
72
+ - [TreeView] Remove remaining occurences of the word "node" in the codebase (#12712) @flaviendelangle
73
+ - [TreeView] Return `instance` and `publicAPI` methods from plugin and populate the main objects inside `useTreeView` (#12650) @flaviendelangle
74
+ - [TreeView] Fix behaviors when the item order changes (#12369) @flaviendelangle
75
+
76
+ ### Docs
77
+
78
+ - [docs] Add `AxisFormatter` documentation for customizing tick/tooltip value formatting (#12700) @JCQuintas
79
+ - [docs] Add file explorer example to rich tree view customization docs (#12707) @noraleonte
80
+ - [docs] Do not use import of depth 3 in the doc (#12716) @flaviendelangle
81
+ - [docs] Explain how to clip plots with composition (#12679) @alexfauquette
82
+ - [docs] Fix typo in Data Grid v7 migration page (#12720) @bfaulk96
83
+ - [docs] Fix typo in Pickers v7 migration page (#12721) @bfaulk96
84
+
85
+ ### Core
86
+
87
+ - [core] Support multiple resolved `l10n` PR packages (#12735) @LukasTy
88
+ - [core] Update Netlify release references in release README (#12687) @LukasTy
89
+ - [core] Use `describeTreeView` for icons tests (#12672) @flaviendelangle
90
+ - [core] Use `describeTreeView` in existing tests for `useTreeViewItems` (#12732) @flaviendelangle
91
+
92
+ ## 7.1.1
93
+
94
+ _Apr 5, 2024_
95
+
96
+ We'd like to offer a big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
97
+
98
+ - 🚀 Add `setItemExpansion` Tree View API method (#12595) @flaviendelangle
99
+ - 🌍 Improve Persian (fa-IR), Portuguese (pt-BR), and Spanish (es-ES) locale on the Data Grid
100
+ - 🌍 Improve Persian (fa-IR), Portuguese (pt-BR), and Ukrainian (uk-UA) locale on the Pickers
101
+ - 🐞 Bugfixes
102
+ - 📚 Documentation improvements
103
+
104
+ ### Data Grid
105
+
106
+ #### `@mui/x-data-grid@7.1.1`
107
+
108
+ - [DataGrid] Allow higher packages' props to be used in MIT (#12365) @MBilalShafi
109
+ - [DataGrid] Fix RTL mode (#12583) @romgrk
110
+ - [DataGrid] Fix `ColDefChangesGridNoSnap` demo crash (#12663) @MBilalShafi
111
+ - [DataGrid] Fix server-side filter demo not working (#12662) @MBilalShafi
112
+ - [DataGrid] Log error if `rowCount` is used with client-side pagination (#12448) @michelengelen
113
+ - [DataGrid] Remove `GridFormatterParams` completely (#12660) @romgrk
114
+ - [DataGrid] Restore main slot (#12657) @romgrk
115
+ - [l10n] Improve Persian (fa-IR) locale (#12630) @amirhosseinzf
116
+ - [l10n] Improve Portuguese (pt-BR) locale (#12618) @hugoalkimim
117
+ - [l10n] Improve Spanish (es-ES) locale (#12606) @aitor40
118
+
119
+ #### `@mui/x-data-grid-pro@7.1.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
120
+
121
+ Same changes as in `@mui/x-data-grid@7.1.1`.
122
+
123
+ #### `@mui/x-data-grid-premium@7.1.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
124
+
125
+ Same changes as in `@mui/x-data-grid-pro@7.1.1`.
126
+
127
+ ### Date and Time Pickers
128
+
129
+ #### `@mui/x-date-pickers@7.1.1`
130
+
131
+ - [fields] Fix `readOnly` behavior (#12609) @LukasTy
132
+ - [l10n] Improve Persian (fa-IR) locale (#12632) @misafari
133
+ - [l10n] Improve Portuguese (pt-BR) locale (#12613) @cnHealth
134
+ - [l10n] Improve Ukrainian (uk-UA) locale (#12627) @alexkobylansky
135
+
136
+ #### `@mui/x-date-pickers-pro@7.1.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
137
+
138
+ Same changes as in `@mui/x-date-pickers@7.1.1`, plus:
139
+
140
+ - [DateTimeRangePicker] Fix selection on same day (#12604) @LukasTy
141
+
142
+ ### Charts
143
+
144
+ #### `@mui/x-charts@7.1.1`
145
+
146
+ - [charts] Fix `tickInterval` usage for y-axis (#12592) @alexfauquette
147
+ - [charts] Fix Scatter series highlight when `id` is a `number` (#12677) @JCQuintas
148
+ - [charts] Fix TS error when using `sx` property on `ChartsTooltip` (#12659) @JCQuintas
149
+
150
+ ### Tree View
151
+
152
+ #### `@mui/x-tree-view@7.1.1`
153
+
154
+ - [TreeView] Add JSDoc to all `publicAPI` methods (#12649) @flaviendelangle
155
+ - [TreeView] Create `RichTreeViewPro` component (not released yet) (#12610) @flaviendelangle
156
+ - [TreeView] Create pro package (not released yet) (#12240) @flaviendelangle
157
+ - [TreeView] Fix typo in errors (#12623) @alissa-tung
158
+ - [TreeView] New API method: `setItemExpansion` (#12595) @flaviendelangle
159
+
160
+ ### Docs
161
+
162
+ - [docs] Add a recipe for the `checkboxSelectionVisibleOnly` prop (#12646) @michelengelen
163
+ - [docs] Explain the use of `_action: 'delete'` in `processRowUpdate` (#12670) @michelengelen
164
+ - [docs] Fix formatting and typo on migration guide @oliviertassinari
165
+ - [docs] Fix formatting in changelog @oliviertassinari
166
+ - [docs] Fix grammar in TreeView migration doc (#12615) @joshkel
167
+ - [docs] Fix missing closing props in `PieShapeNoSnap` demo (#12636) @alp-ex
168
+ - [docs] Fix type arguments in Custom Field page (#12619) @Juneezee
169
+ - [docs] Fix typo in `getItemId` prop description (#12637) @flaviendelangle
170
+ - [docs] Make the Charts `margin` usage more visible (#12591) @alexfauquette
171
+ - [docs] Match IE 11 spacing with Material UI @oliviertassinari
172
+ - [docs] Move data grid interfaces to standard API page layout (#12016) @alexfauquette
173
+ - [docs] Remove ` around @default values (#12158) @alexfauquette
174
+ - [docs] Remove `day` from the default `dayOfWeekFormatter` function params (#12644) @LukasTy
175
+ - [docs] Use `TreeItem2` for icon expansion example on `RichTreeView` (#12563) @flaviendelangle
176
+
177
+ ### Core
178
+
179
+ - [core] Add cherry-pick `master` to `v6` action (#12648) @LukasTy
180
+ - [core] Fix typo in `@mui/x-tree-view-pro/themeAugmentation` (#12674) @flaviendelangle
181
+ - [core] Introduce `describeTreeView` to run test on `SimpleTreeView` and `RichTreeView`, using `TreeItem` and `TreeItem2` + migrate expansion tests (#12428) @flaviendelangle
182
+ - [core] Limit `test-types` CI step allowed memory (#12651) @LukasTy
183
+ - [core] Remove explicit `express` package (#12602) @LukasTy
184
+ - [core] Update to new embedded translations in the docs package (#12232) @Janpot
185
+ - [core] Use PR labels to identify the package a `l10n` PR belongs to (#12639) @LukasTy
186
+ - [core] Use `describeTreeView` for selection tests (#12647) @flaviendelangle
187
+ - [docs-infra] Adjust the links to search for issues (#11995) @michelengelen
188
+ - [infra] Polish support survey experience (#12624) @oliviertassinari
189
+ - [support-infra] Replace author association with a permission check in survey action (#12068) @michelengelen
190
+ - [support-infra] Fix user permission check (#12669) @michelengelen
191
+ - [test] Fix Tree View test import (#12668) @LukasTy
192
+
6
193
  ## 7.1.0
7
194
 
8
195
  _Mar 28, 2024_
@@ -74,7 +261,7 @@ Same changes as in `@mui/x-date-pickers@7.1.0`, plus:
74
261
  - [core] Include `DateTimeRangePicker` tag in `releaseChangelog` (#12526) @LukasTy
75
262
  - [core] Upgrade monorepo (#12536) @cherniavskii
76
263
 
77
- ## v7.0.0
264
+ ## 7.0.0
78
265
 
79
266
  _Mar 22, 2024_
80
267
 
@@ -530,13 +717,13 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
530
717
 
531
718
  - 🎁 Introduce a new DOM structure for the field components that provides a better accessibility
532
719
  - 🚀 Simplify Data Grid DOM structure for improved performance (#12013) @romgrk
533
- - 🕥 The support for IE11 has been removed (#12151) @flaviendelangle
720
+ - 🕥 The support for IE 11 has been removed (#12151) @flaviendelangle
534
721
  - 🐞 Bugfixes
535
722
  - 📚 Documentation improvements
536
723
 
537
724
  ### Breaking changes
538
725
 
539
- - The support for IE11 has been removed from all MUI X packages. The `legacy` bundle that used to support old browsers like IE11 is no longer included.
726
+ - The support for IE 11 has been removed from all MUI X packages. The `legacy` bundle that used to support old browsers like IE 11 is no longer included.
540
727
 
541
728
  ### Data Grid
542
729
 
@@ -641,7 +828,7 @@ These components are no longer exported from `@mui/x-charts`:
641
828
 
642
829
  ### Tree View / `@mui/x-tree-view@7.0.0-beta.4`
643
830
 
644
- - [TreeView] Stop using custom `findIndex` to support IE11 (#12129) @flaviendelangle
831
+ - [TreeView] Stop using custom `findIndex` to support IE 11 (#12129) @flaviendelangle
645
832
 
646
833
  ### Docs
647
834
 
@@ -2871,6 +3058,76 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
2871
3058
  - [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
2872
3059
  - [license] Correctly throw errors (#10924) @oliviertassinari
2873
3060
 
3061
+ ## 6.19.9
3062
+
3063
+ _Apr 5, 2024_
3064
+
3065
+ We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
3066
+
3067
+ - 🐞 Bugfixes
3068
+ - 📚 Documentation improvements
3069
+
3070
+ ### Data Grid
3071
+
3072
+ #### `@mui/x-data-grid@6.19.9`
3073
+
3074
+ - [DataGrid] Remove legacy editing API event: `rowEditCommit` (#12087) @MBilalShafi
3075
+
3076
+ #### `@mui/x-data-grid-pro@6.19.9` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
3077
+
3078
+ Same changes as in `@mui/x-data-grid@6.19.9`.
3079
+
3080
+ #### `@mui/x-data-grid-premium@6.19.9` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
3081
+
3082
+ Same changes as in `@mui/x-data-grid-pro@6.19.9`.
3083
+
3084
+ ### Date Pickers
3085
+
3086
+ #### `@mui/x-date-pickers@6.19.9`
3087
+
3088
+ No changes.
3089
+
3090
+ #### `@mui/x-date-pickers-pro@6.19.9` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
3091
+
3092
+ - [DateRangePicker] Fix selection behavior with single input field when `readOnly` (#12605) @LukasTy
3093
+
3094
+ ### Docs
3095
+
3096
+ - [docs] Add a recipe for the `checkboxSelectionVisibleOnly` prop (#12667) @michelengelen
3097
+ - [docs] Explain the use of `_action: 'delete'` in `processRowUpdate` (#12673) @michelengelen
3098
+
3099
+ ### Core
3100
+
3101
+ - [core] Use Circle CI context (#12607) @cherniavskii
3102
+
3103
+ ## 6.19.8
3104
+
3105
+ _Mar 20, 2024_
3106
+
3107
+ We'd like to offer a big thanks to the 3 contributors who made this release possible.
3108
+
3109
+ ### Data Grid
3110
+
3111
+ #### `@mui/x-data-grid@6.19.8`
3112
+
3113
+ - [DataGrid] Fix `ElementType` usage (#12505) @cherniavskii
3114
+ - [DataGrid] Fix cell value formatting on copy (#12483) @sai6855
3115
+ - [DataGrid] Fix checkbox selection when filtering (#12485) @g1mishra
3116
+
3117
+ #### `@mui/x-data-grid-pro@6.19.8` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
3118
+
3119
+ Same changes as in `@mui/x-data-grid@6.19.8`.
3120
+
3121
+ #### `@mui/x-data-grid-premium@6.19.8` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
3122
+
3123
+ Same changes as in `@mui/x-data-grid-pro@6.19.8`, plus:
3124
+
3125
+ - [DataGridPremium] Add support for confirmation before clipboard paste (#12466) @cherniavskii
3126
+
3127
+ ### Docs
3128
+
3129
+ - [docs] Update links to v7 (#12495) @cherniavskii
3130
+
2874
3131
  ## 6.19.7
2875
3132
 
2876
3133
  _Mar 14, 2024_
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MUI X Data Grid
2
2
 
3
- This package is the Community plan edition of the data grid component.
3
+ This package is the Community plan edition of the Data Grid components.
4
4
  It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
5
5
 
6
6
  ## Installation
@@ -93,6 +93,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
93
93
  const handleRef = useForkRef(ref, refProp);
94
94
  const rowNode = apiRef.current.getRowNode(rowId);
95
95
  const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
96
+ const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
96
97
  const hasFocusCell = focusedColumnIndex !== undefined;
97
98
  const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < renderContext.firstColumnIndex;
98
99
  const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= renderContext.lastColumnIndex;
@@ -284,7 +285,8 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
284
285
  pinnedOffset: pinnedOffset,
285
286
  pinnedPosition: pinnedPosition,
286
287
  sectionIndex: indexInSection,
287
- sectionLength: sectionLength
288
+ sectionLength: sectionLength,
289
+ gridHasFiller: gridHasFiller
288
290
  }, slotProps?.cell), column.field);
289
291
  };
290
292
 
@@ -29,6 +29,7 @@ export type GridCellProps = {
29
29
  pinnedPosition: PinnedPosition;
30
30
  sectionIndex: number;
31
31
  sectionLength: number;
32
+ gridHasFiller: boolean;
32
33
  onClick?: React.MouseEventHandler<HTMLDivElement>;
33
34
  onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
34
35
  onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["column", "rowId", "editCellState", "align", "children", "colIndex", "width", "className", "style", "gridHasScrollX", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "sectionIndex", "sectionLength", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
3
+ const _excluded = ["column", "rowId", "editCellState", "align", "children", "colIndex", "width", "className", "style", "gridHasScrollX", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "sectionIndex", "sectionLength", "gridHasFiller", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
4
4
  _excluded2 = ["changeReason", "unstable_updateValueOnRender"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
@@ -92,6 +92,7 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
92
92
  pinnedPosition,
93
93
  sectionIndex,
94
94
  sectionLength,
95
+ gridHasFiller,
95
96
  onClick,
96
97
  onDoubleClick,
97
98
  onMouseDown,
@@ -159,11 +160,10 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
159
160
  const cellRef = React.useRef(null);
160
161
  const handleRef = useForkRef(ref, cellRef);
161
162
  const focusElementRef = React.useRef(null);
162
- // @ts-expect-error To access `cellSelection` flag as it's a `premium` feature
163
163
  const isSelectionMode = rootProps.cellSelection ?? false;
164
164
  const position = gridPinnedColumnPositionLookup[pinnedPosition];
165
165
  const showLeftBorder = shouldCellShowLeftBorder(position, sectionIndex);
166
- const showRightBorder = shouldCellShowRightBorder(position, sectionIndex, sectionLength, rootProps.showCellVerticalBorder);
166
+ const showRightBorder = shouldCellShowRightBorder(position, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
167
167
  const ownerState = {
168
168
  align,
169
169
  showLeftBorder,
@@ -329,6 +329,7 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
329
329
  isValidating: PropTypes.bool,
330
330
  value: PropTypes.any
331
331
  }),
332
+ gridHasFiller: PropTypes.bool.isRequired,
332
333
  isNotVisible: PropTypes.bool.isRequired,
333
334
  onClick: PropTypes.func,
334
335
  onDoubleClick: PropTypes.func,
@@ -15,6 +15,7 @@ interface GridColumnGroupHeaderProps {
15
15
  style?: React.CSSProperties;
16
16
  indexInSection: number;
17
17
  sectionLength: number;
18
+ gridHasFiller: boolean;
18
19
  }
19
20
  declare function GridColumnGroupHeader(props: GridColumnGroupHeaderProps): React.JSX.Element;
20
21
  export { GridColumnGroupHeader };
@@ -43,7 +43,8 @@ function GridColumnGroupHeader(props) {
43
43
  pinnedPosition,
44
44
  style,
45
45
  indexInSection,
46
- sectionLength
46
+ sectionLength,
47
+ gridHasFiller
47
48
  } = props;
48
49
  const rootProps = useGridRootProps();
49
50
  const headerCellRef = React.useRef(null);
@@ -71,7 +72,7 @@ function GridColumnGroupHeader(props) {
71
72
  headerComponent = render(renderParams);
72
73
  }
73
74
  const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
74
- const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder);
75
+ const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
75
76
  const ownerState = _extends({}, props, {
76
77
  classes: rootProps.classes,
77
78
  showLeftBorder,
@@ -21,6 +21,7 @@ interface GridColumnHeaderItemProps {
21
21
  style?: React.CSSProperties;
22
22
  indexInSection: number;
23
23
  sectionLength: number;
24
+ gridHasFiller: boolean;
24
25
  }
25
26
  declare function GridColumnHeaderItem(props: GridColumnHeaderItemProps): React.JSX.Element;
26
27
  declare namespace GridColumnHeaderItem {
@@ -54,7 +54,8 @@ function GridColumnHeaderItem(props) {
54
54
  style,
55
55
  pinnedPosition,
56
56
  indexInSection,
57
- sectionLength
57
+ sectionLength,
58
+ gridHasFiller
58
59
  } = props;
59
60
  const apiRef = useGridPrivateApiContext();
60
61
  const rootProps = useGridRootProps();
@@ -69,7 +70,7 @@ function GridColumnHeaderItem(props) {
69
70
  headerComponent = colDef.renderHeader(apiRef.current.getColumnHeaderParams(colDef.field));
70
71
  }
71
72
  const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
72
- const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder);
73
+ const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
73
74
  const ownerState = _extends({}, props, {
74
75
  classes: rootProps.classes,
75
76
  showRightBorder,
@@ -201,6 +202,7 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes = {
201
202
  columnMenuOpen: PropTypes.bool.isRequired,
202
203
  disableReorder: PropTypes.bool,
203
204
  filterItemsCounter: PropTypes.number,
205
+ gridHasFiller: PropTypes.bool.isRequired,
204
206
  hasFocus: PropTypes.bool,
205
207
  headerHeight: PropTypes.number.isRequired,
206
208
  indexInSection: PropTypes.number.isRequired,
@@ -48,7 +48,7 @@ function GridColumnHeaderSeparatorRaw(props) {
48
48
  className: classes.root,
49
49
  style: {
50
50
  minHeight: height,
51
- opacity: rootProps.showColumnVerticalBorder ? 0 : 1
51
+ opacity: rootProps.showColumnVerticalBorder ? 1 : 0
52
52
  }
53
53
  }, other, {
54
54
  onClick: stopClick,
@@ -151,8 +151,8 @@ export const GridRootStyles = styled('div', {
151
151
  }) => {
152
152
  const borderColor = getBorderColor(t);
153
153
  const radius = t.shape.borderRadius;
154
- const containerBackground = t.vars ? t.vars.palette.background.default : t.palette.background.default;
155
- const pinnedBackground = containerBackground;
154
+ const containerBackground = t.vars ? t.vars.palette.background.default : t.mixins.MuiDataGrid?.containerBackground ?? t.palette.background.default;
155
+ const pinnedBackground = t.mixins.MuiDataGrid?.pinnedBackground ?? containerBackground;
156
156
  const overlayBackground = t.vars ? `rgba(${t.vars.palette.background.defaultChannel} / ${t.vars.palette.action.disabledOpacity})` : alpha(t.palette.background.default, t.palette.action.disabledOpacity);
157
157
  const hoverOpacity = (t.vars || t).palette.action.hoverOpacity;
158
158
  const hoverColor = (t.vars || t).palette.action.hover;
@@ -450,7 +450,6 @@ export const GridRootStyles = styled('div', {
450
450
  userSelect: 'none'
451
451
  },
452
452
  [`& .${c['row--dynamicHeight']} > .${c.cell}`]: {
453
- overflow: 'initial',
454
453
  whiteSpace: 'initial',
455
454
  lineHeight: 'inherit'
456
455
  },
@@ -632,6 +631,9 @@ export const GridRootStyles = styled('div', {
632
631
  },
633
632
  [`& .${c.filler}`]: {
634
633
  flex: 1
634
+ },
635
+ [`& .${c['filler--borderTop']}`]: {
636
+ borderTop: '1px solid var(--DataGrid-rowBorderColor)'
635
637
  }
636
638
  });
637
639
  return gridStyle;
@@ -12,6 +12,9 @@ function convertFilterItemValueToInputValue(itemValue, inputType) {
12
12
  return '';
13
13
  }
14
14
  const dateCopy = new Date(itemValue);
15
+ if (Number.isNaN(dateCopy.getTime())) {
16
+ return '';
17
+ }
15
18
  // The date picker expects the date to be in the local timezone.
16
19
  // But .toISOString() converts it to UTC with zero offset.
17
20
  // So we need to subtract the timezone offset.
@@ -48,8 +51,9 @@ function GridFilterInputDate(props) {
48
51
  setFilterValueState(value);
49
52
  setIsApplying(true);
50
53
  filterTimeout.start(rootProps.filterDebounceMs, () => {
54
+ const date = new Date(value);
51
55
  applyValue(_extends({}, item, {
52
- value: new Date(value)
56
+ value: Number.isNaN(date.getTime()) ? undefined : date
53
57
  }));
54
58
  setIsApplying(false);
55
59
  });
@@ -1,17 +1,24 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { styled } from '@mui/system';
4
+ import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
4
5
  import { useGridAriaAttributes } from '../../hooks/utils/useGridAriaAttributes';
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
- const Element = styled('div')({
7
+ const Element = styled('div', {
8
+ name: 'MuiDataGrid',
9
+ slot: 'Main',
10
+ overridesResolver: (props, styles) => styles.main
11
+ })({
7
12
  flexGrow: 1,
8
13
  position: 'relative',
9
14
  overflow: 'hidden'
10
15
  });
11
16
  export const GridMainContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
12
17
  const ariaAttributes = useGridAriaAttributes();
18
+ const rootProps = useGridRootProps();
13
19
  return /*#__PURE__*/_jsx(Element, _extends({
14
20
  ref: ref,
21
+ ownerState: rootProps,
15
22
  className: props.className,
16
23
  tabIndex: -1
17
24
  }, ariaAttributes, {
@@ -21,6 +21,7 @@ const Element = styled('div')({
21
21
  zIndex: 5,
22
22
  bottom: 0,
23
23
  left: 0,
24
+ right: 0,
24
25
  height: 1,
25
26
  width: 'var(--DataGrid-rowWidth)',
26
27
  backgroundColor: 'var(--DataGrid-rowBorderColor)'
@@ -287,6 +287,11 @@ export interface GridClasses {
287
287
  * @ignore - do not document.
288
288
  */
289
289
  filler: string;
290
+ /**
291
+ * Styles applied to the filler row with top border.
292
+ * @ignore - do not document.
293
+ */
294
+ 'filler--borderTop': string;
290
295
  /**
291
296
  * Styles applied to the filler row pinned left section.
292
297
  * @ignore - do not document.
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
2
2
  export function getDataGridUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiDataGrid', slot);
4
4
  }
5
- export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
5
+ export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderTop', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
@@ -15,7 +15,7 @@ export const useGridInitialization = (inputApiRef, props) => {
15
15
  useGridRefs(privateApiRef);
16
16
  useGridTheme(privateApiRef);
17
17
  useGridLoggerFactory(privateApiRef, props);
18
- useGridStateInitialization(privateApiRef, props);
18
+ useGridStateInitialization(privateApiRef);
19
19
  useGridPipeProcessing(privateApiRef);
20
20
  useGridStrategyProcessing(privateApiRef);
21
21
  useGridLocaleText(privateApiRef, props);
@@ -1,4 +1,3 @@
1
1
  import * as React from 'react';
2
- import { DataGridProcessedProps } from '../../models/props/DataGridProps';
3
2
  import type { GridPrivateApiCommon } from '../../models/api/gridApiCommon';
4
- export declare const useGridStateInitialization: <PrivateApi extends GridPrivateApiCommon>(apiRef: React.MutableRefObject<PrivateApi>, props: Pick<DataGridProcessedProps, 'signature'>) => void;
3
+ export declare const useGridStateInitialization: <PrivateApi extends GridPrivateApiCommon>(apiRef: React.MutableRefObject<PrivateApi>) => void;
@@ -1,9 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { GridSignature } from '../utils/useGridApiEventHandler';
4
3
  import { useGridApiMethod } from '../utils';
5
4
  import { isFunction } from '../../utils/utils';
6
- export const useGridStateInitialization = (apiRef, props) => {
5
+ export const useGridStateInitialization = apiRef => {
7
6
  const controlStateMapRef = React.useRef({});
8
7
  const [, rawForceUpdate] = React.useState();
9
8
  const registerControlState = React.useCallback(controlStateItem => {
@@ -62,13 +61,10 @@ export const useGridStateInitialization = (apiRef, props) => {
62
61
  const controlState = controlStateMapRef.current[stateId];
63
62
  const model = controlState.stateSelector(newState, apiRef.current.instanceId);
64
63
  if (controlState.propOnChange && hasPropChanged) {
65
- const details = props.signature === GridSignature.DataGridPro ? {
66
- api: apiRef.current,
67
- reason
68
- } : {
69
- reason
70
- };
71
- controlState.propOnChange(model, details);
64
+ controlState.propOnChange(model, {
65
+ reason,
66
+ api: apiRef.current
67
+ });
72
68
  }
73
69
  if (!ignoreSetState) {
74
70
  apiRef.current.publishEvent(controlState.changeEvent, model, {
@@ -77,7 +73,7 @@ export const useGridStateInitialization = (apiRef, props) => {
77
73
  }
78
74
  }
79
75
  return !ignoreSetState;
80
- }, [apiRef, props.signature]);
76
+ }, [apiRef]);
81
77
  const updateControlState = React.useCallback((key, state, reason) => {
82
78
  return apiRef.current.setState(previousState => {
83
79
  return _extends({}, previousState, {