@mui/x-data-grid 8.9.1 → 8.10.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.
- package/CHANGELOG.md +217 -8
- package/DataGrid/DataGrid.js +5 -0
- package/DataGrid/useDataGridComponent.js +2 -0
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/components/GridDetailPanels.d.ts +2 -2
- package/components/GridFooter.js +1 -1
- package/components/GridPagination.js +4 -3
- package/components/GridPinnedRows.d.ts +2 -2
- package/components/GridRow.js +8 -1
- package/components/cell/GridCell.js +7 -5
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/columnsManagement/GridColumnsManagement.d.ts +6 -0
- package/components/columnsManagement/GridColumnsManagement.js +17 -5
- package/components/containers/GridRootStyles.d.ts +1 -1
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +5 -5
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/DataGrid/DataGrid.js +5 -0
- package/esm/DataGrid/useDataGridComponent.js +2 -0
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/esm/components/GridDetailPanels.d.ts +2 -2
- package/esm/components/GridFooter.js +1 -1
- package/esm/components/GridPagination.js +3 -2
- package/esm/components/GridPinnedRows.d.ts +2 -2
- package/esm/components/GridRow.js +8 -1
- package/esm/components/cell/GridCell.js +7 -5
- package/esm/components/cell/GridEditSingleSelectCell.js +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.d.ts +6 -0
- package/esm/components/columnsManagement/GridColumnsManagement.js +17 -5
- package/esm/components/containers/GridRootStyles.d.ts +1 -1
- package/esm/components/toolbarV8/Toolbar.d.ts +1 -1
- package/esm/components/virtualization/GridVirtualScroller.js +5 -5
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/hooks/core/useGridVirtualizer.d.ts +9 -0
- package/esm/hooks/core/useGridVirtualizer.js +223 -0
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -2
- package/esm/hooks/features/columns/useGridColumnSpanning.js +5 -90
- package/esm/hooks/features/dataSource/models.d.ts +11 -2
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +9 -2
- package/esm/hooks/features/dimensions/useGridDimensions.js +18 -188
- package/esm/hooks/features/editing/useGridRowEditing.js +4 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -1
- package/esm/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/esm/hooks/features/keyboardNavigation/utils.js +5 -5
- package/esm/hooks/features/pivoting/gridPivotingInterfaces.d.ts +0 -1
- package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +1 -4
- package/esm/hooks/features/pivoting/gridPivotingSelectors.js +1 -2
- package/esm/hooks/features/rowReorder/gridRowReorderInterfaces.d.ts +9 -0
- package/esm/hooks/features/rowReorder/gridRowReorderInterfaces.js +1 -0
- package/esm/hooks/features/rowReorder/gridRowReorderSelector.d.ts +5 -0
- package/esm/hooks/features/rowReorder/gridRowReorderSelector.js +3 -0
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/esm/hooks/features/rowSelection/utils.js +5 -0
- package/esm/hooks/features/rows/gridRowsMetaInterfaces.d.ts +2 -8
- package/esm/hooks/features/rows/gridRowsMetaState.d.ts +2 -18
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +3 -1
- package/esm/hooks/features/rows/useGridRowSpanning.d.ts +2 -12
- package/esm/hooks/features/rows/useGridRowSpanning.js +54 -85
- package/esm/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/esm/hooks/features/rows/useGridRowsMeta.js +17 -187
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/esm/hooks/features/virtualization/index.d.ts +1 -0
- package/esm/hooks/features/virtualization/index.js +1 -0
- package/esm/hooks/features/virtualization/useGridVirtualization.d.ts +5 -16
- package/esm/hooks/features/virtualization/useGridVirtualization.js +41 -22
- package/esm/hooks/utils/index.d.ts +1 -1
- package/esm/hooks/utils/index.js +1 -1
- package/esm/hooks/utils/useFirstRender.d.ts +1 -1
- package/esm/hooks/utils/useFirstRender.js +1 -8
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +3 -1
- package/esm/internals/index.js +2 -1
- package/esm/internals/utils/getPinnedCellOffset.js +5 -0
- package/esm/locales/frFR.js +18 -21
- package/esm/locales/heIL.js +12 -12
- package/esm/locales/nnNO.js +96 -107
- package/esm/locales/plPL.js +22 -24
- package/esm/material/index.js +2 -2
- package/esm/models/api/gridApiCommon.d.ts +4 -1
- package/esm/models/api/gridColumnSpanning.d.ts +5 -11
- package/esm/models/gridStateCommunity.d.ts +2 -0
- package/esm/models/props/DataGridProps.d.ts +5 -0
- package/esm/utils/roundToDecimalPlaces.d.ts +1 -1
- package/esm/utils/roundToDecimalPlaces.js +1 -3
- package/hooks/core/useGridVirtualizer.d.ts +9 -0
- package/hooks/core/useGridVirtualizer.js +231 -0
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -3
- package/hooks/features/columns/useGridColumnSpanning.js +5 -91
- package/hooks/features/dataSource/models.d.ts +11 -2
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +10 -3
- package/hooks/features/dimensions/useGridDimensions.js +18 -188
- package/hooks/features/editing/useGridRowEditing.js +4 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -1
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/hooks/features/keyboardNavigation/utils.js +5 -5
- package/hooks/features/pivoting/gridPivotingInterfaces.d.ts +0 -1
- package/hooks/features/pivoting/gridPivotingSelectors.d.ts +1 -4
- package/hooks/features/pivoting/gridPivotingSelectors.js +2 -3
- package/hooks/features/rowReorder/gridRowReorderInterfaces.d.ts +9 -0
- package/hooks/features/rowReorder/gridRowReorderInterfaces.js +5 -0
- package/hooks/features/rowReorder/gridRowReorderSelector.d.ts +5 -0
- package/hooks/features/rowReorder/gridRowReorderSelector.js +9 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/hooks/features/rowSelection/utils.js +5 -0
- package/hooks/features/rows/gridRowsMetaInterfaces.d.ts +2 -8
- package/hooks/features/rows/gridRowsMetaState.d.ts +2 -18
- package/hooks/features/rows/useGridRowAriaAttributes.js +3 -1
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -12
- package/hooks/features/rows/useGridRowSpanning.js +54 -85
- package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/hooks/features/rows/useGridRowsMeta.js +15 -186
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/hooks/features/virtualization/index.d.ts +1 -0
- package/hooks/features/virtualization/index.js +12 -0
- package/hooks/features/virtualization/useGridVirtualization.d.ts +5 -16
- package/hooks/features/virtualization/useGridVirtualization.js +42 -24
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +12 -12
- package/hooks/utils/useFirstRender.d.ts +1 -1
- package/hooks/utils/useFirstRender.js +11 -11
- package/index.js +1 -1
- package/internals/index.d.ts +3 -1
- package/internals/index.js +12 -11
- package/internals/utils/getPinnedCellOffset.js +5 -0
- package/locales/frFR.js +18 -21
- package/locales/heIL.js +12 -12
- package/locales/nnNO.js +96 -107
- package/locales/plPL.js +22 -24
- package/material/index.js +2 -2
- package/models/api/gridApiCommon.d.ts +4 -1
- package/models/api/gridColumnSpanning.d.ts +5 -11
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/props/DataGridProps.d.ts +5 -0
- package/package.json +5 -6
- package/utils/roundToDecimalPlaces.d.ts +1 -1
- package/utils/roundToDecimalPlaces.js +7 -4
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +0 -10
- package/esm/hooks/features/rows/gridRowSpanningSelectors.js +0 -5
- package/esm/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -56
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +0 -843
- package/esm/hooks/utils/useRunOnce.d.ts +0 -5
- package/esm/hooks/utils/useRunOnce.js +0 -18
- package/esm/utils/platform.d.ts +0 -1
- package/esm/utils/platform.js +0 -2
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +0 -10
- package/hooks/features/rows/gridRowSpanningSelectors.js +0 -11
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -56
- package/hooks/features/virtualization/useGridVirtualScroller.js +0 -854
- package/hooks/utils/useRunOnce.d.ts +0 -5
- package/hooks/utils/useRunOnce.js +0 -27
- package/utils/platform.d.ts +0 -1
- package/utils/platform.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,215 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.10.0
|
|
9
|
+
|
|
10
|
+
_Aug 8, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 17 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 [`FunnelChart`](https://mui.com/x/react-charts/funnel/) marked as stable
|
|
15
|
+
- 📈 [Zoom slider](https://mui.com/x/react-charts/zoom-and-pan/#zoom-slider) and [Preview](https://mui.com/x/react-charts/zoom-and-pan/#preview) marked as stable
|
|
16
|
+
- 📈 Supporting [label groups](https://mui.com/x/react-charts/axis/#grouped-axes) in band and point axis
|
|
17
|
+
- 🌎 Improve Norwegian Nynorsk (nn-NO) locale on the Data Grid
|
|
18
|
+
- 🐞 Bugfixes
|
|
19
|
+
- 📚 Documentation improvements
|
|
20
|
+
|
|
21
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
22
|
+
@AnderzL7, @aqeelat, @dwrth, @noobyogi0010, @nusr, @sai6855
|
|
23
|
+
|
|
24
|
+
The following are all team members who have contributed to this release:
|
|
25
|
+
@arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @oliviertassinari, @rita-codes, @romgrk
|
|
26
|
+
|
|
27
|
+
### Data Grid
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid@8.10.0`
|
|
30
|
+
|
|
31
|
+
- [DataGrid] Move spread operator in `BaseSelect` to allow `variant` change (#19026) @dwrth
|
|
32
|
+
- [DataGrid] Use `use-sync-external-store` shim (#19063) @romgrk
|
|
33
|
+
- [DataGrid] Allow skipping cache in `dataSource.fetchRows()` API method (#18904) @MBilalShafi
|
|
34
|
+
- [DataGrid] Do not call `preProcessEditCellProps()` if cell is not editable based on `isCellEditable()` (#18405) @nusr
|
|
35
|
+
- [DataGrid] Fix `renderCountry` throwing an error when used in tree data (#19068) @cherniavskii
|
|
36
|
+
- [DataGrid] Fix performance issue for root level "select all" (#19015) @MBilalShafi
|
|
37
|
+
- [DataGrid] Fix pagination `slotProps` being ignored by the grid (#19095) @romgrk
|
|
38
|
+
- [l10n] Improve Norwegian Nynorsk (nn-NO) locale (#19076) @AnderzL7
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid@8.10.0`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPro] Fix row reorder not working with column reorder disabled (#19016) @MBilalShafi
|
|
45
|
+
- [DataGridPro] Fix header filters cache sharing issue (#19090) @MBilalShafi
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-data-grid-premium@8.10.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
48
|
+
|
|
49
|
+
Same changes as in `@mui/x-data-grid-pro@8.10.0`, plus:
|
|
50
|
+
|
|
51
|
+
- [DataGridPremium] Allow additional derived columns customization via `valueFormatter` (#18982) @arminmeh
|
|
52
|
+
- [DataGridPremium] Fix complex `singleSelect` columns not working in pivot model (#18971) @cherniavskii
|
|
53
|
+
|
|
54
|
+
### Date and Time Pickers
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-date-pickers@8.10.0`
|
|
57
|
+
|
|
58
|
+
- [pickers] `MuiPickersLayout-toolbar` is overlapping the Calendar in RTL `MobileDatePicker` variant (#18981) @rita-codes
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
61
|
+
|
|
62
|
+
Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
63
|
+
|
|
64
|
+
### Charts
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts@8.10.0`
|
|
67
|
+
|
|
68
|
+
- [charts] Add `groups` to `band` and `point` axis config (#18766) @JCQuintas
|
|
69
|
+
- [charts] Animation example using `motion` library (#18993) @JCQuintas
|
|
70
|
+
- [charts] Deprecate `Unstable_` radar exports (#19079) @JCQuintas
|
|
71
|
+
- [charts] Improve grouped axis logic (#19069) @JCQuintas
|
|
72
|
+
- [charts] Fix type assertion in axis highlight components (#19060) @sai6855
|
|
73
|
+
- [charts] Remove unnecessary type assertion in tooltip `valueFormatter` in heatmap (#19047) @sai6855
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-charts-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
76
|
+
|
|
77
|
+
Same changes as in `@mui/x-charts@8.10.0`, plus:
|
|
78
|
+
|
|
79
|
+
- [charts-pro] Fix `slotProps.tooltip.trigger` not respected in `ScatterChartPro` and `FunnelChart` (#18902) @bernardobelchior
|
|
80
|
+
- [charts-pro] Fix zoom filtering adjusting axis too soon (#18992) @bernardobelchior
|
|
81
|
+
- [charts-pro] Mark `FunnelChart` as stable (#19048) @JCQuintas
|
|
82
|
+
- [charts-pro] Mark zoom slider and preview as stable (#19049) @JCQuintas
|
|
83
|
+
- [charts-pro] Refactor `createAxisFilterMapper` (#18998) @bernardobelchior
|
|
84
|
+
|
|
85
|
+
### Tree View
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view@8.10.0`
|
|
88
|
+
|
|
89
|
+
Internal changes.
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
92
|
+
|
|
93
|
+
Same changes as in `@mui/x-tree-view@8.10.0`.
|
|
94
|
+
|
|
95
|
+
### Codemod
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-codemod@8.10.0`
|
|
98
|
+
|
|
99
|
+
Internal changes.
|
|
100
|
+
|
|
101
|
+
### Docs
|
|
102
|
+
|
|
103
|
+
- [docs] Add CSS bundler breaking change to migration guide (#17436) @romgrk
|
|
104
|
+
- [docs] `RichTreeViewPro` demo for dragging via custom drag-handle is not working properly (#19008) @rita-codes
|
|
105
|
+
- [docs] Fix broken link to D3 in Charts (#19020) @oliviertassinari
|
|
106
|
+
- [docs] Revise the Charts Animation doc (#18990) @mapache-salvaje
|
|
107
|
+
- [docs] Fix incorrect code in line chart preview (#19023) @noobyogi0010
|
|
108
|
+
- [docs] Improve bundling instructions for the Data Grid (#19065) @romgrk
|
|
109
|
+
- [docs] Reduce image size in the inventory grid demo (#19004) @arminmeh
|
|
110
|
+
|
|
111
|
+
### Core
|
|
112
|
+
|
|
113
|
+
- [core] Fix ESLint reference name @oliviertassinari
|
|
114
|
+
|
|
115
|
+
### Miscellaneous
|
|
116
|
+
|
|
117
|
+
- [infra] Remove bundle size tracking for subpaths (#19072) @Janpot
|
|
118
|
+
- [infra] Accept `PORT` env on `docs:dev` script (#19014) @JCQuintas
|
|
119
|
+
- [infra] Skip codesandbox iframe demos in regressions tests (#18970) @cherniavskii
|
|
120
|
+
- [infra] Remove package.json `module` field (#18961) @Janpot
|
|
121
|
+
- [internal] Remove peer dependency on `@mui/system` (#19062) @aqeelat
|
|
122
|
+
|
|
123
|
+
## 8.9.2
|
|
124
|
+
|
|
125
|
+
_Jul 31, 2025_
|
|
126
|
+
|
|
127
|
+
We'd like to extend a big thank you to the 23 contributors who made this release possible. Here are some highlights ✨:
|
|
128
|
+
|
|
129
|
+
- 🌎 Improve French (fr-FR), Hebrew (he-IL) and Polish (pl-PL) locales on the Data Grid
|
|
130
|
+
- 🌎 Improve Korean (ko-KR) locale on the Date and Time Pickers
|
|
131
|
+
- 📈 Add symlog scale to charts
|
|
132
|
+
- 📊 Fix bar border radius on Firefox
|
|
133
|
+
- 🐞 Bugfixes
|
|
134
|
+
- 📚 Documentation improvements
|
|
135
|
+
|
|
136
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
137
|
+
@AmrElnaggar99, @atlanteh, @ddolcimascolo, @Jiseoup, @leonaha5, @noherczeg, @sai6855
|
|
138
|
+
|
|
139
|
+
The following are all team members who have contributed to this release:
|
|
140
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @bharatkashyap, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @mapache-salvaje, @MBilalShafi, @rita-codes, @romgrk, @siriwatknp
|
|
141
|
+
|
|
142
|
+
### Data Grid
|
|
143
|
+
|
|
144
|
+
#### `@mui/x-data-grid@8.9.2`
|
|
145
|
+
|
|
146
|
+
- [DataGrid] Add debounce for columns panel search (#18719) @noherczeg
|
|
147
|
+
- [DataGrid] Extract virtualization engine (#18275) @romgrk
|
|
148
|
+
- [DataGrid] Improve types in `<GridEditSingleSelect />` (#18184) @sai6855
|
|
149
|
+
- [l10n] Improve French (fr-FR) locale (#18905) @ddolcimascolo
|
|
150
|
+
- [l10n] Improve Hebrew (he-IL) locale (#18665) @atlanteh
|
|
151
|
+
- [l10n] Improve Polish (pl-PL) locale (#18068) @leonaha5
|
|
152
|
+
|
|
153
|
+
#### `@mui/x-data-grid-pro@8.9.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
154
|
+
|
|
155
|
+
Same changes as in `@mui/x-data-grid@8.9.2`, plus:
|
|
156
|
+
|
|
157
|
+
- [DataGridPro] Fix duplicate nested rows for dynamically updated row IDs (#18526) @MBilalShafi
|
|
158
|
+
|
|
159
|
+
#### `@mui/x-data-grid-premium@8.9.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
160
|
+
|
|
161
|
+
Same changes as in `@mui/x-data-grid-pro@8.9.2`, plus:
|
|
162
|
+
|
|
163
|
+
- [DataGridPremium] Add `privateMode` to AI assistant prompt resolver (#18759) @bharatkashyap
|
|
164
|
+
- [DataGridPremium] Fix empty nested group values caused by main criterial `valueFormatter()` (#18916) @cherniavskii
|
|
165
|
+
- [DataGridPremium] Sidebar content and state is managed the same way as for preference panel (#18741) @arminmeh
|
|
166
|
+
- [DataGridPremium] Make `api` param for the aggregation function optional (#18984) @arminmeh
|
|
167
|
+
|
|
168
|
+
### Date and Time Pickers
|
|
169
|
+
|
|
170
|
+
#### `@mui/x-date-pickers@8.9.2`
|
|
171
|
+
|
|
172
|
+
- [l10n] Improve Korean (ko-KR) locale (#18664) @Jiseoup
|
|
173
|
+
- [pickers] Fix popper click-away behavior (#18804) @LukasTy
|
|
174
|
+
- [pickers] Fix usage not in main document (#18944) @LukasTy
|
|
175
|
+
|
|
176
|
+
#### `@mui/x-date-pickers-pro@8.9.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
177
|
+
|
|
178
|
+
Same changes as in `@mui/x-date-pickers@8.9.2`.
|
|
179
|
+
|
|
180
|
+
### Charts
|
|
181
|
+
|
|
182
|
+
#### `@mui/x-charts@8.9.2`
|
|
183
|
+
|
|
184
|
+
- [charts] Add symlog scale to charts (#18729) @bernardobelchior
|
|
185
|
+
- [charts] Fix bar border radius on Firefox (#18824) @bernardobelchior
|
|
186
|
+
- [charts] Fix crash when rendering large scatter dataset (#18845) @bernardobelchior
|
|
187
|
+
- [charts] Remove unnecessary type assertion in tooltip `valueFormatter()` (#18877) @sai6855
|
|
188
|
+
- [charts] Export `ChartsWrapper` from `'./ChartsWrapper'` rather than `'./internals'` (#18966) @JCQuintas
|
|
189
|
+
|
|
190
|
+
#### `@mui/x-charts-pro@8.9.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
191
|
+
|
|
192
|
+
Same changes as in `@mui/x-charts@8.9.2`, plus:
|
|
193
|
+
|
|
194
|
+
- [charts-pro] Fix voronoi interaction with zoom (#18950) @alexfauquette
|
|
195
|
+
- [charts-pro] Hide toolbar by default when exporting (#18764) @bernardobelchior
|
|
196
|
+
|
|
197
|
+
### Codemod
|
|
198
|
+
|
|
199
|
+
#### `@mui/x-codemod@8.9.2`
|
|
200
|
+
|
|
201
|
+
Internal changes.
|
|
202
|
+
|
|
203
|
+
### Docs
|
|
204
|
+
|
|
205
|
+
- [docs] Add Data Grid demo pages (#18180) @KenanYusuf
|
|
206
|
+
- [docs] Copyedit the Charts Overview page (#18840) @mapache-salvaje
|
|
207
|
+
- [docs] Fix incorrect parameter name in pickers "Custom components" page from `variant` to `pickerVariant` (#18919) @AmrElnaggar99
|
|
208
|
+
|
|
209
|
+
### Miscellaneous
|
|
210
|
+
|
|
211
|
+
- [code-infra] Auto-generate deep exports to prevent asymmetric exports (#18917) @JCQuintas
|
|
212
|
+
- [docs-infra] Turn on "Edit in Chat" for X docs (#18869) @siriwatknp
|
|
213
|
+
- [infra] Add specific bundle size tracking (#18884) @Janpot
|
|
214
|
+
- [infra] Fix markdown formatting in llms generation (#18914) @Janpot
|
|
215
|
+
- [infra] Use CI action from mui-public (#18709) @brijeshb42
|
|
216
|
+
|
|
8
217
|
## 8.9.1
|
|
9
218
|
|
|
10
219
|
_Jul 21, 2025_
|
|
@@ -23,11 +232,11 @@ The following are all team members who have contributed to this release:
|
|
|
23
232
|
- [DataGrid] Move conditional list view column logic into `gridVisibleColumnDefinitionsSelector` (#18724) @KenanYusuf
|
|
24
233
|
- [DataGrid] Fix row selection "exclude" model inconsistency (#18844) @MBilalShafi
|
|
25
234
|
|
|
26
|
-
#### `@mui/x-data-grid-pro@8.9.1` [](https://mui.com/r/x-pro-svg-link
|
|
235
|
+
#### `@mui/x-data-grid-pro@8.9.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
236
|
|
|
28
237
|
Same changes as in `@mui/x-data-grid@8.9.1`.
|
|
29
238
|
|
|
30
|
-
#### `@mui/x-data-grid-premium@8.9.1` [](https://mui.com/r/x-premium-svg-link
|
|
239
|
+
#### `@mui/x-data-grid-premium@8.9.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
31
240
|
|
|
32
241
|
Same changes as in `@mui/x-data-grid-pro@8.9.1`.
|
|
33
242
|
|
|
@@ -324,8 +533,8 @@ Same changes as in `@mui/x-tree-view@8.7.0`, plus:
|
|
|
324
533
|
|
|
325
534
|
- [code-infra] Bump code-infra version and fix breaking changes (#18653) @brijeshb42
|
|
326
535
|
- [code-infra] Ensure `material-ui/disallow-react-api-in-server-components` ESLint rule is applied (#18570) @LukasTy
|
|
327
|
-
- [code-infra] Migrate to flat
|
|
328
|
-
- [code-infra] Refactor
|
|
536
|
+
- [code-infra] Migrate to flat ESLint config (#18562) @brijeshb42
|
|
537
|
+
- [code-infra] Refactor ESLint config (#18643) @LukasTy
|
|
329
538
|
- [infra] Add renovatebot rule for latest infra packages (#18609) @Janpot
|
|
330
539
|
- [infra] Move pushArgos script to code-infra (#18667) @Janpot
|
|
331
540
|
- [infra] Updates release script to fetch latest major version from upstream (#18552) @michelengelen
|
|
@@ -1239,7 +1448,7 @@ Same changes as in `@mui/x-tree-view@8.2.0`.
|
|
|
1239
1448
|
- [core] Fix all Vale errors @oliviertassinari
|
|
1240
1449
|
- [core] Move `loadStyleSheets` to internals and use it in data grid and charts (#17548) @bernardobelchior
|
|
1241
1450
|
- [core] Remove empty version (#17582) @oliviertassinari
|
|
1242
|
-
- [core] Remove
|
|
1451
|
+
- [core] Remove ESLint from codemod spec files (#17443) @alexfauquette
|
|
1243
1452
|
- [core] Remove unnecessary versions (#17597) @oliviertassinari
|
|
1244
1453
|
- [code-infra] Allow postinstall scripts for packages requesting it (#17635) @LukasTy
|
|
1245
1454
|
- [code-infra] Data Grid `vitest` changes (#17619) @JCQuintas
|
|
@@ -6733,7 +6942,7 @@ Same changes as in `@mui/x-date-pickers@7.8.0`.
|
|
|
6733
6942
|
|
|
6734
6943
|
### Core
|
|
6735
6944
|
|
|
6736
|
-
- [core] Add
|
|
6945
|
+
- [core] Add ESLint rule to restrict import from `../internals` root (#13633) @JCQuintas
|
|
6737
6946
|
- [docs-infra] Sync `\_app` folder with monorepo (#13582) @Janpot
|
|
6738
6947
|
- [license] Allow usage of Charts and Tree View Pro package for old premium licenses (#13619) @flaviendelangle
|
|
6739
6948
|
|
|
@@ -6871,7 +7080,7 @@ Same changes as in `@mui/x-date-pickers@7.7.0`.
|
|
|
6871
7080
|
|
|
6872
7081
|
- [charts] Add watermark on the pro `ResponsiveChartContainer` (#13398) @alexfauquette
|
|
6873
7082
|
- [charts] Allow to specify y-axis configuration (#13438) @alexfauquette
|
|
6874
|
-
- [charts] Fix
|
|
7083
|
+
- [charts] Fix ESLint for react compiler (#13444) @alexfauquette
|
|
6875
7084
|
- [charts] Improve themeAugmentation typing (#13433) @noraleonte
|
|
6876
7085
|
- [charts] Move the `ZAxisContextProvider` by default in the `ChartContainer` (#13465) @alexfauquette
|
|
6877
7086
|
- [charts] Use plugins to define series extremum and colors (#13397) @alexfauquette
|
|
@@ -7418,7 +7627,7 @@ Same changes as in `@mui/x-date-pickers@7.3.1`.
|
|
|
7418
7627
|
- [core] Use `describeTreeView` for focus tests (#12698) @flaviendelangle
|
|
7419
7628
|
- [core] Use `describeTreeView` for type-ahead tests (#12811) @flaviendelangle
|
|
7420
7629
|
- [code-infra] Change package manager to `pnpm` (#11875) @LukasTy
|
|
7421
|
-
- [code-infra] Closer sync with
|
|
7630
|
+
- [code-infra] Closer sync with ESLint config of codebase (#12864) @oliviertassinari
|
|
7422
7631
|
- [support-infra] Add release announcement to GitHub workflows (#11867) (#12843) @michelengelen
|
|
7423
7632
|
|
|
7424
7633
|
## 7.3.0
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -133,6 +133,11 @@ DataGridRaw.propTypes = {
|
|
|
133
133
|
* @default 150
|
|
134
134
|
*/
|
|
135
135
|
columnBufferPx: _propTypes.default.number,
|
|
136
|
+
/**
|
|
137
|
+
* The milliseconds delay to wait after a keystroke before triggering filtering in the columns menu.
|
|
138
|
+
* @default 150
|
|
139
|
+
*/
|
|
140
|
+
columnFilterDebounceMs: _propTypes.default.number,
|
|
136
141
|
/**
|
|
137
142
|
* Sets the height in pixels of the column group headers in the Data Grid.
|
|
138
143
|
* Inherits the `columnHeaderHeight` value if not set.
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.useDataGridComponent = void 0;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _useGridInitialization = require("../hooks/core/useGridInitialization");
|
|
11
|
+
var _useGridVirtualizer = require("../hooks/core/useGridVirtualizer");
|
|
11
12
|
var _useGridInitializeState = require("../hooks/utils/useGridInitializeState");
|
|
12
13
|
var _useGridClipboard = require("../hooks/features/clipboard/useGridClipboard");
|
|
13
14
|
var _useGridColumnMenu = require("../hooks/features/columnMenu/useGridColumnMenu");
|
|
@@ -71,6 +72,7 @@ const useDataGridComponent = (apiRef, props) => {
|
|
|
71
72
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridDimensions.dimensionsStateInitializer, apiRef, props);
|
|
72
73
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridRowsMeta.rowsMetaStateInitializer, apiRef, props);
|
|
73
74
|
(0, _useGridInitializeState.useGridInitializeState)(_useGridListView.listViewStateInitializer, apiRef, props);
|
|
75
|
+
(0, _useGridVirtualizer.useGridVirtualizer)(apiRef, props);
|
|
74
76
|
(0, _useGridKeyboardNavigation.useGridKeyboardNavigation)(apiRef, props);
|
|
75
77
|
(0, _useGridRowSelection.useGridRowSelection)(apiRef, props);
|
|
76
78
|
(0, _useGridColumns.useGridColumns)(apiRef, props);
|
|
@@ -32,6 +32,7 @@ const GRID_CHECKBOX_SELECTION_COL_DEF = exports.GRID_CHECKBOX_SELECTION_COL_DEF
|
|
|
32
32
|
const rowId = (0, _gridPropsSelectors.gridRowIdSelector)(apiRef, row);
|
|
33
33
|
return apiRef.current.isRowSelected(rowId);
|
|
34
34
|
},
|
|
35
|
+
rowSpanValueGetter: (_, row, column, apiRef) => (0, _gridPropsSelectors.gridRowIdSelector)(apiRef, row),
|
|
35
36
|
renderHeader: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaderCheckbox.GridHeaderCheckbox, (0, _extends2.default)({}, params)),
|
|
36
37
|
renderCell: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridCellCheckboxRenderer.GridCellCheckboxRenderer, (0, _extends2.default)({}, params))
|
|
37
38
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { VirtualScrollerCompat } from '@mui/x-virtualizer';
|
|
2
2
|
export interface GridDetailPanelsProps {
|
|
3
|
-
virtualScroller:
|
|
3
|
+
virtualScroller: VirtualScrollerCompat;
|
|
4
4
|
}
|
|
5
5
|
export declare function GridDetailPanels(_: GridDetailPanelsProps): null;
|
package/components/GridFooter.js
CHANGED
|
@@ -32,7 +32,7 @@ const GridFooter = exports.GridFooter = (0, _forwardRef.forwardRef)(function Gri
|
|
|
32
32
|
rowCount: totalTopLevelRowCount,
|
|
33
33
|
visibleRowCount: visibleTopLevelRowCount
|
|
34
34
|
})) : null;
|
|
35
|
-
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.pagination, {});
|
|
35
|
+
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.pagination, (0, _extends2.default)({}, rootProps.slotProps?.pagination));
|
|
36
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridFooterContainer.GridFooterContainer, (0, _extends2.default)({}, props, {
|
|
37
37
|
ref: ref,
|
|
38
38
|
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.GridPagination = GridPagination;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var React = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _styles = require("@mui/material/styles");
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -67,7 +68,7 @@ function GridPagination() {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
const pageSizeOptions = isPageSizeIncludedInPageSizeOptions(paginationModel.pageSize) ? rootProps.pageSizeOptions : [];
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridPaginationRoot, {
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridPaginationRoot, (0, _extends2.default)({
|
|
71
72
|
as: rootProps.slots.basePagination,
|
|
72
73
|
count: rowCount,
|
|
73
74
|
page: computedPage,
|
|
@@ -76,7 +77,7 @@ function GridPagination() {
|
|
|
76
77
|
onPageChange: handlePageChange,
|
|
77
78
|
onRowsPerPageChange: handlePageSizeChange,
|
|
78
79
|
disabled: disabled
|
|
79
|
-
});
|
|
80
|
+
}, rootProps.slotProps?.basePagination));
|
|
80
81
|
}
|
|
81
82
|
process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
|
|
82
83
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { VirtualScrollerCompat } from '@mui/x-virtualizer';
|
|
2
2
|
export interface GridPinnedRowsProps {
|
|
3
3
|
position: 'top' | 'bottom';
|
|
4
|
-
virtualScroller:
|
|
4
|
+
virtualScroller: VirtualScrollerCompat;
|
|
5
5
|
}
|
|
6
6
|
export declare function GridPinnedRows(_: GridPinnedRowsProps): null;
|
package/components/GridRow.js
CHANGED
|
@@ -31,6 +31,7 @@ var _constants = require("../internals/constants");
|
|
|
31
31
|
var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelector");
|
|
32
32
|
var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
|
|
33
33
|
var _gridEditingSelectors = require("../hooks/features/editing/gridEditingSelectors");
|
|
34
|
+
var _gridRowReorderSelector = require("../hooks/features/rowReorder/gridRowReorderSelector");
|
|
34
35
|
var _GridScrollbarFillerCell = require("./GridScrollbarFillerCell");
|
|
35
36
|
var _getPinnedCellOffset = require("../internals/utils/getPinnedCellOffset");
|
|
36
37
|
var _useGridConfiguration = require("../hooks/utils/useGridConfiguration");
|
|
@@ -85,6 +86,7 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
85
86
|
const columnPositions = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridColumnPositionsSelector);
|
|
86
87
|
const rowReordering = rootProps.rowReordering;
|
|
87
88
|
const isRowReorderingEnabled = (0, _useGridSelector.useGridSelector)(apiRef, isRowReorderingEnabledSelector, rowReordering);
|
|
89
|
+
const isRowDragActive = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowReorderSelector.gridIsRowDragActiveSelector);
|
|
88
90
|
const handleRef = (0, _useForkRef.default)(ref, refProp);
|
|
89
91
|
const rowNode = (0, _gridRowsSelector.gridRowNodeSelector)(apiRef, rowId);
|
|
90
92
|
const editing = (0, _useGridSelector.useGridSelector)(apiRef, _gridEditingSelectors.gridRowIsEditingSelector, {
|
|
@@ -209,6 +211,11 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
209
211
|
});
|
|
210
212
|
rowClassNames.push(rootProps.getRowClassName(rowParams));
|
|
211
213
|
}
|
|
214
|
+
|
|
215
|
+
// XXX: fix this properly
|
|
216
|
+
if (!rowNode) {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
212
219
|
const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = _constants.PinnedColumnPosition.NONE) => {
|
|
213
220
|
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
|
214
221
|
if (cellColSpanInfo?.spannedByColSpan) {
|
|
@@ -232,7 +239,7 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
232
239
|
const isReorderCell = column.field === '__reorder__';
|
|
233
240
|
const canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
234
241
|
const canReorderRow = isRowReorderingEnabled && !sortModel.length && treeDepth <= 1;
|
|
235
|
-
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
|
|
242
|
+
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow || isRowDragActive);
|
|
236
243
|
const cellIsNotVisible = pinnedPosition === _constants.PinnedColumnPosition.VIRTUAL;
|
|
237
244
|
const showLeftBorder = (0, _cellBorderUtils.shouldCellShowLeftBorder)(pinnedPosition, indexInSection);
|
|
238
245
|
const showRightBorder = (0, _cellBorderUtils.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
@@ -19,6 +19,8 @@ var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
|
|
|
19
19
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
20
20
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
21
21
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
22
|
+
var _store = require("@mui/x-internals/store");
|
|
23
|
+
var _xVirtualizer = require("@mui/x-virtualizer");
|
|
22
24
|
var _doesSupportPreventScroll = require("../../utils/doesSupportPreventScroll");
|
|
23
25
|
var _gridClasses = require("../../constants/gridClasses");
|
|
24
26
|
var _models = require("../../models");
|
|
@@ -27,7 +29,6 @@ var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
|
27
29
|
var _gridFocusStateSelector = require("../../hooks/features/focus/gridFocusStateSelector");
|
|
28
30
|
var _gridColumnsInterfaces = require("../../hooks/features/columns/gridColumnsInterfaces");
|
|
29
31
|
var _constants = require("../../internals/constants");
|
|
30
|
-
var _gridRowSpanningSelectors = require("../../hooks/features/rows/gridRowSpanningSelectors");
|
|
31
32
|
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
32
33
|
var _gridEditingSelectors = require("../../hooks/features/editing/gridEditingSelectors");
|
|
33
34
|
var _utils = require("../../internals/utils");
|
|
@@ -123,8 +124,9 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
123
124
|
id: rowId,
|
|
124
125
|
field
|
|
125
126
|
}));
|
|
126
|
-
const
|
|
127
|
-
const
|
|
127
|
+
const store = apiRef.current.virtualizer.store;
|
|
128
|
+
const hiddenCells = (0, _store.useStore)(store, _xVirtualizer.Rowspan.selectors.hiddenCells);
|
|
129
|
+
const spannedCells = (0, _store.useStore)(store, _xVirtualizer.Rowspan.selectors.spannedCells);
|
|
128
130
|
const {
|
|
129
131
|
hasFocus,
|
|
130
132
|
isEditable = false,
|
|
@@ -193,8 +195,8 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
193
195
|
propHandler(event);
|
|
194
196
|
}
|
|
195
197
|
}, [apiRef, field, rowId]);
|
|
196
|
-
const isCellRowSpanned = hiddenCells[rowId]?.[
|
|
197
|
-
const rowSpan = spannedCells[rowId]?.[
|
|
198
|
+
const isCellRowSpanned = hiddenCells[rowId]?.[colIndex] ?? false;
|
|
199
|
+
const rowSpan = spannedCells[rowId]?.[colIndex] ?? 1;
|
|
198
200
|
const style = React.useMemo(() => {
|
|
199
201
|
if (isNotVisible) {
|
|
200
202
|
return {
|
|
@@ -22,7 +22,7 @@ var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange", "initialOpen", "slotProps"];
|
|
24
24
|
function isKeyboardEvent(event) {
|
|
25
|
-
return !!event.key;
|
|
25
|
+
return 'key' in event && !!event.key;
|
|
26
26
|
}
|
|
27
27
|
function GridEditSingleSelectCell(props) {
|
|
28
28
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TextFieldProps } from "../../models/gridBaseSlots.js";
|
|
3
|
+
import type { DataGridProcessedProps } from "../../models/props/DataGridProps.js";
|
|
3
4
|
import type { GridColDef } from "../../models/colDef/gridColDef.js";
|
|
4
5
|
export interface GridColumnsManagementProps {
|
|
5
6
|
sort?: 'asc' | 'desc';
|
|
6
7
|
searchPredicate?: (column: GridColDef, searchValue: string) => boolean;
|
|
7
8
|
searchInputProps?: Partial<TextFieldProps>;
|
|
9
|
+
/**
|
|
10
|
+
* The milliseconds delay to wait after a keystroke before triggering filtering in the columns menu.
|
|
11
|
+
* @default 150
|
|
12
|
+
*/
|
|
13
|
+
searchDebounceMs?: DataGridProcessedProps['columnFilterDebounceMs'];
|
|
8
14
|
/**
|
|
9
15
|
* If `true`, the column search field will be focused automatically.
|
|
10
16
|
* If `false`, the first column switch input will be focused automatically.
|
|
@@ -12,6 +12,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
+
var _debounce = _interopRequireDefault(require("@mui/utils/debounce"));
|
|
15
16
|
var _styles = require("@mui/material/styles");
|
|
16
17
|
var _InputBase = require("@mui/material/InputBase");
|
|
17
18
|
var _cssVariables = require("../../constants/cssVariables");
|
|
@@ -59,8 +60,12 @@ function GridColumnsManagement(props) {
|
|
|
59
60
|
disableResetButton = false,
|
|
60
61
|
toggleAllMode = 'all',
|
|
61
62
|
getTogglableColumns,
|
|
62
|
-
searchInputProps
|
|
63
|
+
searchInputProps,
|
|
64
|
+
searchDebounceMs = rootProps.columnFilterDebounceMs
|
|
63
65
|
} = props;
|
|
66
|
+
const debouncedFilter = React.useMemo(() => (0, _debounce.default)(value => {
|
|
67
|
+
setSearchValue(value);
|
|
68
|
+
}, searchDebounceMs ?? 150), [searchDebounceMs]);
|
|
64
69
|
const isResetDisabled = React.useMemo(() => (0, _utils.checkColumnVisibilityModelsSame)(columnVisibilityModel, initialColumnVisibilityModel), [columnVisibilityModel, initialColumnVisibilityModel]);
|
|
65
70
|
const sortedColumns = React.useMemo(() => {
|
|
66
71
|
switch (sort) {
|
|
@@ -105,8 +110,8 @@ function GridColumnsManagement(props) {
|
|
|
105
110
|
return apiRef.current.setColumnVisibilityModel(newModel);
|
|
106
111
|
}, [apiRef, columns, getTogglableColumns, toggleAllMode, currentColumns]);
|
|
107
112
|
const handleSearchValueChange = React.useCallback(event => {
|
|
108
|
-
|
|
109
|
-
}, []);
|
|
113
|
+
debouncedFilter(event.target.value);
|
|
114
|
+
}, [debouncedFilter]);
|
|
110
115
|
const hideableColumns = React.useMemo(() => currentColumns.filter(col => col.hideable), [currentColumns]);
|
|
111
116
|
const allHideableColumnsVisible = React.useMemo(() => hideableColumns.every(column => columnVisibilityModel[column.field] == null || columnVisibilityModel[column.field] !== false), [columnVisibilityModel, hideableColumns]);
|
|
112
117
|
const allHideableColumnsHidden = React.useMemo(() => hideableColumns.every(column => columnVisibilityModel[column.field] === false), [columnVisibilityModel, hideableColumns]);
|
|
@@ -128,7 +133,10 @@ function GridColumnsManagement(props) {
|
|
|
128
133
|
};
|
|
129
134
|
const handleSearchReset = React.useCallback(() => {
|
|
130
135
|
setSearchValue('');
|
|
131
|
-
searchInputRef.current
|
|
136
|
+
if (searchInputRef.current) {
|
|
137
|
+
searchInputRef.current.value = '';
|
|
138
|
+
searchInputRef.current.focus();
|
|
139
|
+
}
|
|
132
140
|
}, []);
|
|
133
141
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
134
142
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(GridColumnsManagementHeader, {
|
|
@@ -140,7 +148,6 @@ function GridColumnsManagement(props) {
|
|
|
140
148
|
placeholder: apiRef.current.getLocaleText('columnsManagementSearchTitle'),
|
|
141
149
|
inputRef: searchInputRef,
|
|
142
150
|
className: classes.searchInput,
|
|
143
|
-
value: searchValue,
|
|
144
151
|
onChange: handleSearchValueChange,
|
|
145
152
|
size: "small",
|
|
146
153
|
type: "search",
|
|
@@ -243,6 +250,11 @@ process.env.NODE_ENV !== "production" ? GridColumnsManagement.propTypes = {
|
|
|
243
250
|
* @returns {GridColDef['field'][]} The list of togglable columns' field names.
|
|
244
251
|
*/
|
|
245
252
|
getTogglableColumns: _propTypes.default.func,
|
|
253
|
+
/**
|
|
254
|
+
* The milliseconds delay to wait after a keystroke before triggering filtering in the columns menu.
|
|
255
|
+
* @default 150
|
|
256
|
+
*/
|
|
257
|
+
searchDebounceMs: _propTypes.default.number,
|
|
246
258
|
searchInputProps: _propTypes.default.object,
|
|
247
259
|
searchPredicate: _propTypes.default.func,
|
|
248
260
|
sort: _propTypes.default.oneOf(['asc', 'desc']),
|
|
@@ -2,4 +2,4 @@ import { DataGridProcessedProps } from "../../models/props/DataGridProps.js";
|
|
|
2
2
|
export type OwnerState = DataGridProcessedProps;
|
|
3
3
|
export declare const GridRootStyles: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
4
4
|
ownerState: OwnerState;
|
|
5
|
-
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").
|
|
5
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -6,7 +6,7 @@ export type ToolbarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
6
6
|
*/
|
|
7
7
|
render?: RenderProp<React.ComponentProps<typeof ToolbarRoot>>;
|
|
8
8
|
};
|
|
9
|
-
declare const ToolbarRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.
|
|
9
|
+
declare const ToolbarRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
10
10
|
/**
|
|
11
11
|
* The top level Toolbar component that provides context to child components.
|
|
12
12
|
* It renders a styled `<div />` element.
|
|
@@ -11,12 +11,12 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _system = require("@mui/system");
|
|
12
12
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
13
|
var _gridDimensionsSelectors = require("../../hooks/features/dimensions/gridDimensionsSelectors");
|
|
14
|
+
var _rows = require("../../hooks/features/rows");
|
|
14
15
|
var _GridScrollArea = require("../GridScrollArea");
|
|
15
16
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
16
|
-
var
|
|
17
|
+
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
17
18
|
var _useGridSelector = require("../../hooks/utils/useGridSelector");
|
|
18
19
|
var _gridClasses = require("../../constants/gridClasses");
|
|
19
|
-
var _useGridVirtualScroller = require("../../hooks/features/virtualization/useGridVirtualScroller");
|
|
20
20
|
var _useGridOverlays = require("../../hooks/features/overlays/useGridOverlays");
|
|
21
21
|
var _GridHeaders = require("../GridHeaders");
|
|
22
22
|
var _GridMainContainer = require("./GridMainContainer");
|
|
@@ -69,7 +69,7 @@ const Scroller = (0, _system.styled)('div', {
|
|
|
69
69
|
});
|
|
70
70
|
const hasPinnedRightSelector = apiRef => apiRef.current.state.dimensions.rightPinnedWidth > 0;
|
|
71
71
|
function GridVirtualScroller(props) {
|
|
72
|
-
const apiRef = (0,
|
|
72
|
+
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
73
73
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
74
74
|
const hasScrollY = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridHasScrollYSelector);
|
|
75
75
|
const hasScrollX = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridHasScrollXSelector);
|
|
@@ -85,7 +85,7 @@ function GridVirtualScroller(props) {
|
|
|
85
85
|
hasPinnedRight
|
|
86
86
|
}, overlaysProps);
|
|
87
87
|
const classes = useUtilityClasses(ownerState);
|
|
88
|
-
const virtualScroller =
|
|
88
|
+
const virtualScroller = apiRef.current.virtualizer.api.useVirtualization().getters;
|
|
89
89
|
const {
|
|
90
90
|
getContainerProps,
|
|
91
91
|
getScrollerProps,
|
|
@@ -96,7 +96,7 @@ function GridVirtualScroller(props) {
|
|
|
96
96
|
getRows,
|
|
97
97
|
getScrollAreaProps
|
|
98
98
|
} = virtualScroller;
|
|
99
|
-
const rows = getRows();
|
|
99
|
+
const rows = getRows(undefined, (0, _rows.gridRowTreeSelector)(apiRef));
|
|
100
100
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridMainContainer.GridMainContainer, (0, _extends2.default)({
|
|
101
101
|
className: classes.root
|
|
102
102
|
}, getContainerProps(), {
|
|
@@ -16,6 +16,7 @@ const DATA_GRID_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PROPS_DEFAULT_VALUES =
|
|
|
16
16
|
checkboxSelectionVisibleOnly: false,
|
|
17
17
|
clipboardCopyCellDelimiter: '\t',
|
|
18
18
|
columnBufferPx: 150,
|
|
19
|
+
columnFilterDebounceMs: 150,
|
|
19
20
|
columnHeaderHeight: 56,
|
|
20
21
|
disableAutosize: false,
|
|
21
22
|
disableColumnFilter: false,
|
package/esm/DataGrid/DataGrid.js
CHANGED
|
@@ -126,6 +126,11 @@ DataGridRaw.propTypes = {
|
|
|
126
126
|
* @default 150
|
|
127
127
|
*/
|
|
128
128
|
columnBufferPx: PropTypes.number,
|
|
129
|
+
/**
|
|
130
|
+
* The milliseconds delay to wait after a keystroke before triggering filtering in the columns menu.
|
|
131
|
+
* @default 150
|
|
132
|
+
*/
|
|
133
|
+
columnFilterDebounceMs: PropTypes.number,
|
|
129
134
|
/**
|
|
130
135
|
* Sets the height in pixels of the column group headers in the Data Grid.
|
|
131
136
|
* Inherits the `columnHeaderHeight` value if not set.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useGridInitialization } from "../hooks/core/useGridInitialization.js";
|
|
5
|
+
import { useGridVirtualizer } from "../hooks/core/useGridVirtualizer.js";
|
|
5
6
|
import { useGridInitializeState } from "../hooks/utils/useGridInitializeState.js";
|
|
6
7
|
import { useGridClipboard } from "../hooks/features/clipboard/useGridClipboard.js";
|
|
7
8
|
import { columnMenuStateInitializer, useGridColumnMenu } from "../hooks/features/columnMenu/useGridColumnMenu.js";
|
|
@@ -65,6 +66,7 @@ export const useDataGridComponent = (apiRef, props) => {
|
|
|
65
66
|
useGridInitializeState(dimensionsStateInitializer, apiRef, props);
|
|
66
67
|
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
67
68
|
useGridInitializeState(listViewStateInitializer, apiRef, props);
|
|
69
|
+
useGridVirtualizer(apiRef, props);
|
|
68
70
|
useGridKeyboardNavigation(apiRef, props);
|
|
69
71
|
useGridRowSelection(apiRef, props);
|
|
70
72
|
useGridColumns(apiRef, props);
|