@mui/x-data-grid 6.5.0 → 6.7.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 +150 -2
- package/DataGrid/DataGrid.js +10 -3
- package/README.md +2 -2
- package/components/GridColumnHeaders.js +4 -9
- package/components/GridHeader.d.ts +2 -2
- package/components/base/GridBody.d.ts +1 -1
- package/components/base/GridFooterPlaceholder.d.ts +2 -2
- package/components/base/GridOverlays.d.ts +2 -2
- package/components/cell/GridActionsCell.d.ts +3 -3
- package/components/cell/GridActionsCell.js +3 -3
- package/components/cell/GridBooleanCell.d.ts +1 -1
- package/components/cell/GridEditBooleanCell.d.ts +2 -2
- package/components/cell/GridEditDateCell.d.ts +2 -2
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditSingleSelectCell.d.ts +3 -3
- package/components/cell/GridEditSingleSelectCell.js +5 -5
- package/components/cell/GridSkeletonCell.d.ts +1 -1
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +2 -2
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +2 -2
- package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.d.ts +1 -1
- package/components/containers/GridRoot.js +1 -3
- package/components/containers/GridRootStyles.js +8 -1
- package/components/index.d.ts +0 -1
- package/components/index.js +1 -2
- package/components/menu/GridMenu.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.ts +2 -2
- package/components/panel/GridColumnsPanel.d.ts +16 -2
- package/components/panel/GridColumnsPanel.js +14 -0
- package/components/panel/GridPanelContent.d.ts +1 -1
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelHeader.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +3 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputDate.js +1 -6
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +6 -6
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -6
- package/components/panel/filterPanel/GridFilterPanel.d.ts +8 -0
- package/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/components/toolbar/GridToolbarExport.d.ts +2 -2
- package/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/components/toolbar/GridToolbarQuickFilter.d.ts +2 -2
- package/constants/gridClasses.d.ts +4 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +4 -4
- package/context/GridContextProvider.d.ts +1 -1
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +10 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/filter/gridFilterSelector.d.ts +2 -2
- package/hooks/features/filter/gridFilterSelector.js +2 -2
- package/hooks/features/filter/gridFilterState.d.ts +6 -6
- package/hooks/features/filter/gridFilterState.js +6 -0
- package/hooks/features/filter/useGridFilter.js +31 -10
- package/hooks/features/focus/useGridFocus.js +1 -0
- package/hooks/features/preferencesPanel/gridPreferencePanelState.d.ts +2 -0
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/hooks/features/rows/useGridRowsMeta.js +12 -13
- package/hooks/features/sorting/useGridSorting.js +2 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
- package/index.js +1 -1
- package/internals/utils/useProps.js +21 -1
- package/legacy/DataGrid/DataGrid.js +10 -3
- package/legacy/components/GridColumnHeaders.js +4 -9
- package/legacy/components/cell/GridActionsCell.js +3 -3
- package/legacy/components/cell/GridEditSingleSelectCell.js +5 -5
- package/legacy/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/legacy/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/legacy/components/containers/GridRoot.js +1 -3
- package/legacy/components/containers/GridRootStyles.js +8 -4
- package/legacy/components/index.js +1 -2
- package/legacy/components/panel/GridColumnsPanel.js +14 -0
- package/legacy/components/panel/GridPreferencesPanel.js +3 -1
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +7 -7
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +1 -5
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +7 -6
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +1 -5
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +11 -5
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/legacy/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/legacy/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +4 -4
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/legacy/hooks/features/filter/gridFilterSelector.js +4 -4
- package/legacy/hooks/features/filter/gridFilterState.js +6 -0
- package/legacy/hooks/features/filter/useGridFilter.js +31 -10
- package/legacy/hooks/features/focus/useGridFocus.js +1 -0
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/legacy/hooks/features/rows/useGridRowsMeta.js +13 -21
- package/legacy/hooks/features/sorting/useGridSorting.js +2 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
- package/legacy/index.js +1 -1
- package/legacy/internals/utils/useProps.js +23 -1
- package/legacy/locales/arSD.js +12 -12
- package/legacy/locales/beBY.js +12 -12
- package/legacy/locales/bgBG.js +12 -12
- package/legacy/locales/csCZ.js +25 -27
- package/legacy/locales/daDK.js +12 -12
- package/legacy/locales/deDE.js +25 -27
- package/legacy/locales/elGR.js +12 -12
- package/legacy/locales/esES.js +12 -12
- package/legacy/locales/faIR.js +12 -12
- package/legacy/locales/fiFI.js +12 -12
- package/legacy/locales/frFR.js +25 -27
- package/legacy/locales/heIL.js +12 -12
- package/legacy/locales/huHU.js +12 -12
- package/legacy/locales/itIT.js +12 -12
- package/legacy/locales/jaJP.js +12 -12
- package/legacy/locales/koKR.js +12 -12
- package/legacy/locales/nbNO.js +12 -12
- package/legacy/locales/nlNL.js +25 -27
- package/legacy/locales/plPL.js +12 -12
- package/legacy/locales/ptBR.js +12 -12
- package/legacy/locales/roRO.js +12 -12
- package/legacy/locales/ruRU.js +12 -12
- package/legacy/locales/skSK.js +12 -12
- package/legacy/locales/svSE.js +12 -12
- package/legacy/locales/trTR.js +18 -19
- package/legacy/locales/ukUA.js +12 -12
- package/legacy/locales/urPK.js +12 -12
- package/legacy/locales/viVN.js +12 -12
- package/legacy/locales/zhCN.js +12 -12
- package/legacy/locales/zhTW.js +12 -12
- package/legacy/models/gridFilterItem.js +1 -1
- package/legacy/utils/EventManager.js +2 -2
- package/locales/arSD.js +12 -12
- package/locales/beBY.js +12 -12
- package/locales/bgBG.js +12 -12
- package/locales/csCZ.js +25 -27
- package/locales/daDK.js +12 -12
- package/locales/deDE.js +25 -27
- package/locales/elGR.js +12 -12
- package/locales/esES.js +12 -12
- package/locales/faIR.js +12 -12
- package/locales/fiFI.js +12 -12
- package/locales/frFR.js +25 -27
- package/locales/heIL.js +12 -12
- package/locales/huHU.js +12 -12
- package/locales/itIT.js +12 -12
- package/locales/jaJP.js +12 -12
- package/locales/koKR.js +12 -12
- package/locales/nbNO.js +12 -12
- package/locales/nlNL.js +25 -27
- package/locales/plPL.js +12 -12
- package/locales/ptBR.js +12 -12
- package/locales/roRO.js +12 -12
- package/locales/ruRU.js +12 -12
- package/locales/skSK.js +12 -12
- package/locales/svSE.js +12 -12
- package/locales/trTR.js +18 -19
- package/locales/ukUA.js +12 -12
- package/locales/urPK.js +12 -12
- package/locales/viVN.js +12 -12
- package/locales/zhCN.js +12 -12
- package/locales/zhTW.js +12 -12
- package/material/components/MUISelectOption.d.ts +2 -2
- package/models/api/gridFilterApi.d.ts +3 -1
- package/models/api/gridPreferencesPanelApi.d.ts +3 -1
- package/models/events/gridEventLookup.d.ts +8 -0
- package/models/gridFilterItem.d.ts +1 -1
- package/models/gridFilterItem.js +1 -1
- package/models/gridFilterOperator.d.ts +1 -1
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/props/DataGridProps.d.ts +5 -0
- package/modern/DataGrid/DataGrid.js +10 -3
- package/modern/components/GridColumnHeaders.js +4 -9
- package/modern/components/cell/GridActionsCell.js +3 -3
- package/modern/components/cell/GridEditSingleSelectCell.js +5 -5
- package/modern/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/modern/components/containers/GridRoot.js +1 -3
- package/modern/components/containers/GridRootStyles.js +8 -1
- package/modern/components/index.js +1 -2
- package/modern/components/panel/GridColumnsPanel.js +14 -0
- package/modern/components/panel/GridPreferencesPanel.js +3 -1
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +1 -6
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +6 -6
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -6
- package/modern/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/modern/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/modern/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/modern/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/modern/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +4 -4
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +2 -2
- package/modern/hooks/features/filter/gridFilterState.js +6 -0
- package/modern/hooks/features/filter/useGridFilter.js +31 -10
- package/modern/hooks/features/focus/useGridFocus.js +1 -0
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/modern/hooks/features/rows/useGridRowsMeta.js +12 -13
- package/modern/hooks/features/sorting/useGridSorting.js +2 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internals/utils/useProps.js +20 -1
- package/modern/locales/arSD.js +12 -12
- package/modern/locales/beBY.js +12 -12
- package/modern/locales/bgBG.js +12 -12
- package/modern/locales/csCZ.js +25 -27
- package/modern/locales/daDK.js +12 -12
- package/modern/locales/deDE.js +25 -27
- package/modern/locales/elGR.js +12 -12
- package/modern/locales/esES.js +12 -12
- package/modern/locales/faIR.js +12 -12
- package/modern/locales/fiFI.js +12 -12
- package/modern/locales/frFR.js +25 -27
- package/modern/locales/heIL.js +12 -12
- package/modern/locales/huHU.js +12 -12
- package/modern/locales/itIT.js +12 -12
- package/modern/locales/jaJP.js +12 -12
- package/modern/locales/koKR.js +12 -12
- package/modern/locales/nbNO.js +12 -12
- package/modern/locales/nlNL.js +25 -27
- package/modern/locales/plPL.js +12 -12
- package/modern/locales/ptBR.js +12 -12
- package/modern/locales/roRO.js +12 -12
- package/modern/locales/ruRU.js +12 -12
- package/modern/locales/skSK.js +12 -12
- package/modern/locales/svSE.js +12 -12
- package/modern/locales/trTR.js +18 -19
- package/modern/locales/ukUA.js +12 -12
- package/modern/locales/urPK.js +12 -12
- package/modern/locales/viVN.js +12 -12
- package/modern/locales/zhCN.js +12 -12
- package/modern/locales/zhTW.js +12 -12
- package/modern/models/gridFilterItem.js +1 -1
- package/modern/utils/EventManager.js +2 -2
- package/node/DataGrid/DataGrid.js +10 -3
- package/node/components/GridColumnHeaders.js +3 -8
- package/node/components/cell/GridActionsCell.js +3 -3
- package/node/components/cell/GridEditSingleSelectCell.js +5 -5
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +12 -3
- package/node/components/containers/GridRoot.js +1 -3
- package/node/components/containers/GridRootStyles.js +8 -1
- package/node/components/index.js +0 -11
- package/node/components/panel/GridColumnsPanel.js +14 -0
- package/node/components/panel/GridPreferencesPanel.js +3 -1
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
- package/node/components/panel/filterPanel/GridFilterInputDate.js +1 -6
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +6 -6
- package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -6
- package/node/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/node/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/node/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/node/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/node/components/toolbar/GridToolbarFilterButton.js +10 -3
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +4 -4
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/node/hooks/features/filter/gridFilterSelector.js +2 -2
- package/node/hooks/features/filter/gridFilterState.js +6 -0
- package/node/hooks/features/filter/useGridFilter.js +35 -14
- package/node/hooks/features/focus/useGridFocus.js +1 -0
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/node/hooks/features/rows/useGridRowsMeta.js +12 -13
- package/node/hooks/features/sorting/useGridSorting.js +2 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/utils/useProps.js +20 -1
- package/node/locales/arSD.js +12 -12
- package/node/locales/beBY.js +12 -12
- package/node/locales/bgBG.js +12 -12
- package/node/locales/csCZ.js +25 -27
- package/node/locales/daDK.js +12 -12
- package/node/locales/deDE.js +25 -27
- package/node/locales/elGR.js +12 -12
- package/node/locales/esES.js +12 -12
- package/node/locales/faIR.js +12 -12
- package/node/locales/fiFI.js +12 -12
- package/node/locales/frFR.js +25 -27
- package/node/locales/heIL.js +12 -12
- package/node/locales/huHU.js +12 -12
- package/node/locales/itIT.js +12 -12
- package/node/locales/jaJP.js +12 -12
- package/node/locales/koKR.js +12 -12
- package/node/locales/nbNO.js +12 -12
- package/node/locales/nlNL.js +25 -27
- package/node/locales/plPL.js +12 -12
- package/node/locales/ptBR.js +12 -12
- package/node/locales/roRO.js +12 -12
- package/node/locales/ruRU.js +12 -12
- package/node/locales/skSK.js +12 -12
- package/node/locales/svSE.js +12 -12
- package/node/locales/trTR.js +18 -19
- package/node/locales/ukUA.js +12 -12
- package/node/locales/urPK.js +12 -12
- package/node/locales/viVN.js +12 -12
- package/node/locales/zhCN.js +12 -12
- package/node/locales/zhTW.js +12 -12
- package/node/models/gridFilterItem.js +1 -1
- package/node/utils/EventManager.js +2 -2
- package/package.json +4 -4
- package/themeAugmentation/overrides.d.ts +1 -1
- package/utils/EventManager.js +2 -2
- package/components/GridScrollArea.d.ts +0 -10
- package/components/GridScrollArea.js +0 -117
- package/legacy/components/GridScrollArea.js +0 -119
- package/legacy/lib/createDetectElementResize/index.js +0 -145
- package/lib/createDetectElementResize/index.d.ts +0 -18
- package/lib/createDetectElementResize/index.js +0 -145
- package/lib/createDetectElementResize/types.d.ts +0 -9
- package/modern/components/GridScrollArea.js +0 -117
- package/modern/lib/createDetectElementResize/index.js +0 -145
- package/node/components/GridScrollArea.js +0 -126
- package/node/lib/createDetectElementResize/index.js +0 -151
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,154 @@
|
|
|
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
|
+
## 6.7.0
|
|
7
|
+
|
|
8
|
+
_Jun 9, 2023_
|
|
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
|
+
- 🎁 Improve the default `format` prop value on the pickers.
|
|
13
|
+
|
|
14
|
+
Here are a few examples:
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<TimePicker views={['hours', 'minutes', 'seconds']} ampm />
|
|
18
|
+
// Format before v6.7.0: `hh:mm aa`
|
|
19
|
+
// Format after v6.7.0: `hh:mm:ss aa`
|
|
20
|
+
|
|
21
|
+
<DatePicker views={['year']} />
|
|
22
|
+
// Format before v6.7.0: `MM/DD/YYYY`
|
|
23
|
+
// Format after v6.7.0: `YYYY`
|
|
24
|
+
|
|
25
|
+
<DateTimePicker views={['day', 'hours', 'minutes']} ampm />
|
|
26
|
+
// Format before v6.7.0: `MM/DD/YYYY hh:mm aa`
|
|
27
|
+
// Format after v6.7.0: `DD hh:mm aa`
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- 🌍 Add Romanian (ro-RO) locale on the pickers
|
|
31
|
+
- 🌍 Improve German (de-DE) locale on the pickers
|
|
32
|
+
- 🌍 Improve Czech (cs-CZ), German (de-DE) and Turkish (tr-TR) locales on the data grid
|
|
33
|
+
- 🚀 Performance improvements
|
|
34
|
+
- 🐞 Bugfixes
|
|
35
|
+
- 📚 Documentation improvements
|
|
36
|
+
|
|
37
|
+
### `@mui/x-data-grid@v6.7.0` / `@mui/x-data-grid-pro@v6.7.0` / `@mui/x-data-grid-premium@v6.7.0`
|
|
38
|
+
|
|
39
|
+
#### Changes
|
|
40
|
+
|
|
41
|
+
- [DataGrid] Allow overflowing grid root element (#9179) @cherniavskii
|
|
42
|
+
- [DataGrid] Fix module augmentation error when using `@mui/lab` (#9235) @cherniavskii
|
|
43
|
+
- [DataGrid] Fix row with ids matching `Object` prototype (#9265) @romgrk
|
|
44
|
+
- [DataGrid] Fix `sortModel` and `filterModel` resetting when columns change (#9239) @alexgonch
|
|
45
|
+
- [DataGrid] Improve grouping performance for large datasets (#9200) @romgrk
|
|
46
|
+
- [DataGrid] Increase threshold to trigger memory leak warning (#9263) @m4theushw
|
|
47
|
+
- [DataGrid] Update data grid migration guide to include updated type (#9272) @MBilalShafi
|
|
48
|
+
- [DataGridPro] Improve header filter menu visuals (#9181) @MBilalShafi
|
|
49
|
+
- [DataGridPremium] Remove last line break on clipboard paste (#9163) @cherniavskii
|
|
50
|
+
- [l10n] Improve Czech (cs-CZ) locale (#9266) @MartinSkarpa
|
|
51
|
+
- [l10n] Improve German (de-DE) locale (#9259) @ximex
|
|
52
|
+
- [l10n] Improve Turkish (tr-TR) locale (#9237) @MCErtan
|
|
53
|
+
|
|
54
|
+
### `@mui/x-date-pickers@v6.7.0` / `@mui/x-date-pickers-pro@v6.7.0`
|
|
55
|
+
|
|
56
|
+
#### Changes
|
|
57
|
+
|
|
58
|
+
- [l10n] Add Romanian (ro-RO) locale (#9257) @ximex
|
|
59
|
+
- [l10n] Improve German (de-DE) locale (#9258) @ximex
|
|
60
|
+
- [pickers] Apply dynamic default format depending on views for all desktop and mobile pickers (#9126) @flaviendelangle
|
|
61
|
+
- [pickers] Update `DateRangePickerDay` props JSDoc (#9191) @stevus
|
|
62
|
+
|
|
63
|
+
### Docs
|
|
64
|
+
|
|
65
|
+
- [docs] Fix missing props on the `GridFilterPanel` API page (#9180) @cherniavskii
|
|
66
|
+
- [docs] Fix overview page typo (#9230) @LukasTy
|
|
67
|
+
- [docs] Fix version redirect (#9273) @alexfauquette
|
|
68
|
+
|
|
69
|
+
### Core
|
|
70
|
+
|
|
71
|
+
- [core] Temporarily remove the Argos upload on the regression testing (#9267) @flaviendelangle
|
|
72
|
+
- [charts] Add clip-path to avoid charts overflow (#9012) @alexfauquette
|
|
73
|
+
- [charts] Add style customization on bar (#8935) @alexfauquette
|
|
74
|
+
- [charts] Enforce axis `min`/`max` over the `nice()` method (#9189) @alexfauquette
|
|
75
|
+
- [charts] Improve axis label and ticks label alignements (#9190) @alexfauquette
|
|
76
|
+
- [charts] Simplify the switch between responsive and fix dimensions (#9151) @alexfauquette
|
|
77
|
+
|
|
78
|
+
## 6.6.0
|
|
79
|
+
|
|
80
|
+
_Jun 1, 2023_
|
|
81
|
+
|
|
82
|
+
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
83
|
+
|
|
84
|
+
- 🚀 New date time picking UI on [`DesktopDateTimePicker`](https://mui.com/x/react-date-pickers/date-time-picker/)
|
|
85
|
+
|
|
86
|
+
<img src="https://user-images.githubusercontent.com/4941090/242533399-2b106390-8158-4aba-9ca4-b621c6310977.gif" width="628" />
|
|
87
|
+
|
|
88
|
+
- 🚀 Performance improvements
|
|
89
|
+
- 🐞 Bugfixes
|
|
90
|
+
- 📚 Documentation improvements
|
|
91
|
+
- 🌍 Improve Dutch (nl-NL) and French (fr-FR) locales on the data grid
|
|
92
|
+
- 🌍 Add Vietnamese (vi-VN) locale on the pickers
|
|
93
|
+
|
|
94
|
+
### `@mui/x-data-grid@v6.6.0` / `@mui/x-data-grid-pro@v6.6.0` / `@mui/x-data-grid-premium@v6.6.0`
|
|
95
|
+
|
|
96
|
+
#### Changes
|
|
97
|
+
|
|
98
|
+
- [DataGrid] Support data attributes (#8845) @romgrk
|
|
99
|
+
- [DataGrid] Avoid allocations in `hydrateRowsMeta` (#9121) @romgrk
|
|
100
|
+
- [DataGrid] Fix filter input select accessibility (#9018) @Jul13nT
|
|
101
|
+
- [DataGrid] Fix accessibility issues in panels and toolbar buttons (#8862) @romgrk
|
|
102
|
+
- [DataGrid] Fix `onCellEditStop` not invoked (#8857) @romgrk
|
|
103
|
+
- [DataGridPro] Fix auto-scroll when reordering columns (#8856) @m4theushw
|
|
104
|
+
- [DataGridPro] Fix row ID type casting in detail panels lookup (#8976) @minchaej
|
|
105
|
+
- [DataGridPro] Emit `columnWidthChange` event on `touchEnd` of column resize (#8669) @MBilalShafi
|
|
106
|
+
- [DataGridPro] Do not apply filters on `rowExpansionChange` (#8671) @cherniavskii
|
|
107
|
+
- [DataGridPro] Prevent click event on sorting after a resize (#9117) @romgrk
|
|
108
|
+
- [DataGridPremium] Improve Excel export interface (#9128) @TiagoPortfolio
|
|
109
|
+
- [l10n] Improve Dutch (nl-NL) locale (#9043) @thedutchruben
|
|
110
|
+
- [l10n] Improve French (fr-FR) locale (#9109) @Jul13nT
|
|
111
|
+
|
|
112
|
+
### `@mui/x-date-pickers@v6.6.0` / `@mui/x-date-pickers-pro@v6.6.0`
|
|
113
|
+
|
|
114
|
+
#### Changes
|
|
115
|
+
|
|
116
|
+
- [fields] Allow to explicitly define the reference value and improve its default value (#9019) @flaviendelangle
|
|
117
|
+
- [l10n] Add Vietnamese (vi-VN) locale (#9099) @nhannt201
|
|
118
|
+
- [pickers] Add `DigitalClock` to `DesktopDateTimePicker` (#8946) @LukasTy
|
|
119
|
+
- [pickers] Add support for timezones on the adapters (#9068) @flaviendelangle
|
|
120
|
+
- [pickers] Fix `MonthCalendar` and `YearCalendar` disabled validation (#9149) @LukasTy
|
|
121
|
+
- [pickers] Fix bug when fields have a unique section (#9110) @alexfauquette
|
|
122
|
+
- [pickers] Fix focus jumping on Safari (#9072) @LukasTy
|
|
123
|
+
- [pickers] Use the locale start of the week in `getWeekArray` (#9176) @flaviendelangle
|
|
124
|
+
|
|
125
|
+
### Docs
|
|
126
|
+
|
|
127
|
+
- [docs] Add single input range picker demo (#9159) @LukasTy
|
|
128
|
+
- [docs] Align `DateCalendar` demo views with labels (#9152) @LukasTy
|
|
129
|
+
- [docs] Clarify the peer dependency with React (#9067) @oliviertassinari
|
|
130
|
+
- [docs] Fix Norwegian locale typo (#9168) @LukasTy
|
|
131
|
+
- [docs] Fix column menu item demo (#9071) @MBilalShafi
|
|
132
|
+
- [docs] Improve localization table progress bars (#9033) @noraleonte
|
|
133
|
+
- [docs] Smooth performance animation (#8986) @oliviertassinari
|
|
134
|
+
- [docs] Use responsive time and date time pickers and the views sections (#9127) @flaviendelangle
|
|
135
|
+
- [docs] Reduce layout shift in grid demo (#9132) @oliviertassinari
|
|
136
|
+
- [docs] Fix tree data children lazy-loading demo (#8840) @yaredtsy
|
|
137
|
+
- [docs] Improve filtering docs discoverability (#9074) @MBilalShafi
|
|
138
|
+
|
|
139
|
+
### Core
|
|
140
|
+
|
|
141
|
+
- [core] Allow string literals as keys in `localesText` (#9045) @MBilalShafi
|
|
142
|
+
- [core] Fix `randomInt` producing values exceeding `max` value (#9086) @cherniavskii
|
|
143
|
+
- [core] Fix flaky test on `dateWithTimezone` adapter test (#9129) @flaviendelangle
|
|
144
|
+
- [core] Lock `@types/node` on v18 (#9107) @LukasTy
|
|
145
|
+
- [core] Remove `cross-fetch` dependency (#9108) @LukasTy
|
|
146
|
+
- [core] Remove `createDetectElementResize()` replaced with `ResizeObserver` (#9015) @oliviertassinari
|
|
147
|
+
- [core] Upgrade monorepo (#9027) @m4theushw
|
|
148
|
+
- [core] Upgrade monorepo (#9106) @LukasTy
|
|
149
|
+
- [charts] Fix proptypes (#9125) @LukasTy
|
|
150
|
+
- [charts] Generate the charts proptypes (#9010) @alexfauquette
|
|
151
|
+
- [charts] Manage series stacking (#8888) @alexfauquette
|
|
152
|
+
- [license] List side effects in the license package (#9092) @cherniavskii
|
|
153
|
+
|
|
6
154
|
## v6.5.0
|
|
7
155
|
|
|
8
156
|
_May 19, 2023_
|
|
@@ -102,7 +250,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
102
250
|
|
|
103
251
|
### Docs
|
|
104
252
|
|
|
105
|
-
- [docs] Fix date pickers typo in the docs
|
|
253
|
+
- [docs] Fix date pickers typo in the docs (#8939) @richbustos
|
|
106
254
|
- [docs] Fix master detail demo (#8894) @m4theushw
|
|
107
255
|
- [docs] Fix typo in clipboard docs (#8971) @MBilalShafi
|
|
108
256
|
- [docs] Reduce list of dependencies in Codesandbox/Stackblitz demos (#8535) @cherniavskii
|
|
@@ -4440,7 +4588,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
4440
4588
|
|
|
4441
4589
|
- 👔 **Excel export**. You can find this new Premium feature at: https://mui.com/x/react-data-grid/export/#excel-export.
|
|
4442
4590
|
|
|
4443
|
-
- 🔎 **Quick filtering**. You can now add a quick filtering search bar to your grid. To do so, either pass `showQuickFilter` prop to the `<GridToolbar />` or use the `<GridToolbarQuickFilter />` component in your custom toolbar. More information about how to customize the filtering logic is in the [documentation](https://mui.com/x/react-data-grid/filtering
|
|
4591
|
+
- 🔎 **Quick filtering**. You can now add a quick filtering search bar to your grid. To do so, either pass `showQuickFilter` prop to the `<GridToolbar />` or use the `<GridToolbarQuickFilter />` component in your custom toolbar. More information about how to customize the filtering logic is in the [documentation](https://mui.com/x/react-data-grid/filtering/quick-filter/).
|
|
4444
4592
|
|
|
4445
4593
|
<img src="https://user-images.githubusercontent.com/13808724/167700105-5a5acc7c-5463-4871-8514-3d09e2f365ae.png" width="724">
|
|
4446
4594
|
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { chainPropTypes } from '@mui/utils';
|
|
@@ -14,15 +15,16 @@ const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref
|
|
|
14
15
|
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
15
16
|
privateApiRef: privateApiRef,
|
|
16
17
|
props: props,
|
|
17
|
-
children: /*#__PURE__*/_jsxs(GridRoot, {
|
|
18
|
+
children: /*#__PURE__*/_jsxs(GridRoot, _extends({
|
|
18
19
|
className: props.className,
|
|
19
20
|
style: props.style,
|
|
20
21
|
sx: props.sx,
|
|
21
|
-
ref: ref
|
|
22
|
+
ref: ref
|
|
23
|
+
}, props.forwardedProps, {
|
|
22
24
|
children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
|
|
23
25
|
VirtualScrollerComponent: DataGridVirtualScroller
|
|
24
26
|
}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
|
|
25
|
-
})
|
|
27
|
+
}))
|
|
26
28
|
});
|
|
27
29
|
});
|
|
28
30
|
export const DataGrid = /*#__PURE__*/React.memo(DataGridRaw);
|
|
@@ -182,6 +184,11 @@ DataGridRaw.propTypes = {
|
|
|
182
184
|
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
183
185
|
quickFilterValues: PropTypes.array
|
|
184
186
|
}),
|
|
187
|
+
/**
|
|
188
|
+
* Forwarded props for the grid root element.
|
|
189
|
+
* @ignore - do not document.
|
|
190
|
+
*/
|
|
191
|
+
forwardedProps: PropTypes.object,
|
|
185
192
|
/**
|
|
186
193
|
* Function that applies CSS classes dynamically on cells.
|
|
187
194
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ This component has the following peer dependencies that you will need to install
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@mui/material": "^5.4.1",
|
|
23
23
|
"@mui/system": "^5.4.1",
|
|
24
|
-
"react": "^17.0.
|
|
25
|
-
"react-dom": "^17.0.
|
|
24
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
25
|
+
"react-dom": "^17.0.0 || ^18.0.0"
|
|
26
26
|
},
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -4,11 +4,10 @@ const _excluded = ["innerRef", "className", "visibleColumns", "sortColumnLookup"
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useGridColumnHeaders } from '../hooks/features/columnHeaders/useGridColumnHeaders';
|
|
7
|
-
import { GridScrollArea } from './GridScrollArea';
|
|
8
7
|
import { GridBaseColumnHeaders } from './columnHeaders/GridBaseColumnHeaders';
|
|
9
8
|
import { GridColumnHeadersInner } from './columnHeaders/GridColumnHeadersInner';
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
11
|
const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnsHeaders(props, ref) {
|
|
13
12
|
const {
|
|
14
13
|
innerRef,
|
|
@@ -51,18 +50,14 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnsHead
|
|
|
51
50
|
columnGroupsHeaderStructure,
|
|
52
51
|
hasOtherElementInTabSequence
|
|
53
52
|
});
|
|
54
|
-
return /*#__PURE__*/
|
|
53
|
+
return /*#__PURE__*/_jsx(GridBaseColumnHeaders, _extends({
|
|
55
54
|
ref: ref
|
|
56
55
|
}, getRootProps(other), {
|
|
57
|
-
children:
|
|
58
|
-
scrollDirection: "left"
|
|
59
|
-
}), /*#__PURE__*/_jsxs(GridColumnHeadersInner, _extends({
|
|
56
|
+
children: /*#__PURE__*/_jsxs(GridColumnHeadersInner, _extends({
|
|
60
57
|
isDragging: isDragging
|
|
61
58
|
}, getInnerProps(), {
|
|
62
59
|
children: [getColumnGroupHeaders(), getColumnHeaders()]
|
|
63
|
-
}))
|
|
64
|
-
scrollDirection: "right"
|
|
65
|
-
})]
|
|
60
|
+
}))
|
|
66
61
|
}));
|
|
67
62
|
});
|
|
68
63
|
process.env.NODE_ENV !== "production" ? GridColumnHeaders.propTypes = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function GridHeader(): JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function GridHeader(): React.JSX.Element;
|
|
@@ -7,7 +7,7 @@ interface GridBodyProps {
|
|
|
7
7
|
disableVirtualization: boolean;
|
|
8
8
|
}>;
|
|
9
9
|
}
|
|
10
|
-
declare function GridBody(props: GridBodyProps): JSX.Element;
|
|
10
|
+
declare function GridBody(props: GridBodyProps): React.JSX.Element;
|
|
11
11
|
declare namespace GridBody {
|
|
12
12
|
var propTypes: any;
|
|
13
13
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function GridFooterPlaceholder(): JSX.Element | null;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function GridFooterPlaceholder(): React.JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function GridOverlays(): JSX.Element | null;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function GridOverlays(): React.JSX.Element | null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridRenderCellParams } from '../../models/params/gridCellParams';
|
|
3
3
|
import { GridMenuProps } from '../menu/GridMenu';
|
|
4
4
|
interface GridActionsCellProps extends Omit<GridRenderCellParams, 'api'> {
|
|
5
5
|
api?: GridRenderCellParams['api'];
|
|
6
6
|
position?: GridMenuProps['position'];
|
|
7
7
|
}
|
|
8
|
-
declare function GridActionsCell(props: GridActionsCellProps): JSX.Element;
|
|
8
|
+
declare function GridActionsCell(props: GridActionsCellProps): React.JSX.Element;
|
|
9
9
|
declare namespace GridActionsCell {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
12
12
|
export { GridActionsCell };
|
|
13
|
-
export declare const renderActionsCell: (params: GridRenderCellParams) => JSX.Element;
|
|
13
|
+
export declare const renderActionsCell: (params: GridRenderCellParams) => React.JSX.Element;
|
|
@@ -152,9 +152,9 @@ function GridActionsCell(props) {
|
|
|
152
152
|
ref: buttonRef,
|
|
153
153
|
id: buttonId,
|
|
154
154
|
"aria-label": apiRef.current.getLocaleText('actionsCellMore'),
|
|
155
|
-
"aria-
|
|
156
|
-
"aria-expanded": open
|
|
157
|
-
"aria-
|
|
155
|
+
"aria-haspopup": "menu",
|
|
156
|
+
"aria-expanded": open,
|
|
157
|
+
"aria-controls": open ? menuId : undefined,
|
|
158
158
|
role: "menuitem",
|
|
159
159
|
size: "small",
|
|
160
160
|
onClick: showMenu,
|
|
@@ -4,7 +4,7 @@ import { GridRenderCellParams } from '../../models/params/gridCellParams';
|
|
|
4
4
|
import { GridColDef } from '../../models/colDef/gridColDef';
|
|
5
5
|
interface GridBooleanCellProps extends GridRenderCellParams, Omit<SvgIconProps, 'tabIndex' | 'id'> {
|
|
6
6
|
}
|
|
7
|
-
declare function GridBooleanCellRaw(props: GridBooleanCellProps): JSX.Element;
|
|
7
|
+
declare function GridBooleanCellRaw(props: GridBooleanCellProps): React.JSX.Element;
|
|
8
8
|
declare namespace GridBooleanCellRaw {
|
|
9
9
|
var propTypes: any;
|
|
10
10
|
}
|
|
@@ -9,9 +9,9 @@ export interface GridEditBooleanCellProps extends GridRenderEditCellParams, Omit
|
|
|
9
9
|
*/
|
|
10
10
|
onValueChange?: (event: React.ChangeEvent<HTMLInputElement>, newValue: boolean) => Promise<void> | void;
|
|
11
11
|
}
|
|
12
|
-
declare function GridEditBooleanCell(props: GridEditBooleanCellProps): JSX.Element;
|
|
12
|
+
declare function GridEditBooleanCell(props: GridEditBooleanCellProps): React.JSX.Element;
|
|
13
13
|
declare namespace GridEditBooleanCell {
|
|
14
14
|
var propTypes: any;
|
|
15
15
|
}
|
|
16
16
|
export { GridEditBooleanCell };
|
|
17
|
-
export declare const renderEditBooleanCell: (params: GridEditBooleanCellProps) => JSX.Element;
|
|
17
|
+
export declare const renderEditBooleanCell: (params: GridEditBooleanCellProps) => React.JSX.Element;
|
|
@@ -10,9 +10,9 @@ export interface GridEditDateCellProps extends GridRenderEditCellParams, Omit<In
|
|
|
10
10
|
*/
|
|
11
11
|
onValueChange?: (event: React.ChangeEvent<HTMLInputElement>, newValue: Date | null) => Promise<void> | void;
|
|
12
12
|
}
|
|
13
|
-
declare function GridEditDateCell(props: GridEditDateCellProps): JSX.Element;
|
|
13
|
+
declare function GridEditDateCell(props: GridEditDateCellProps): React.JSX.Element;
|
|
14
14
|
declare namespace GridEditDateCell {
|
|
15
15
|
var propTypes: any;
|
|
16
16
|
}
|
|
17
17
|
export { GridEditDateCell };
|
|
18
|
-
export declare const renderEditDateCell: (params: GridRenderEditCellParams) => JSX.Element;
|
|
18
|
+
export declare const renderEditDateCell: (params: GridRenderEditCellParams) => React.JSX.Element;
|
|
@@ -13,4 +13,4 @@ export interface GridEditInputCellProps extends GridRenderEditCellParams, Omit<I
|
|
|
13
13
|
}
|
|
14
14
|
declare const GridEditInputCell: React.ForwardRefExoticComponent<Omit<GridEditInputCellProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
15
15
|
export { GridEditInputCell };
|
|
16
|
-
export declare const renderEditInputCell: (params: GridEditInputCellProps) => JSX.Element;
|
|
16
|
+
export declare const renderEditInputCell: (params: GridEditInputCellProps) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { SelectProps, SelectChangeEvent } from '@mui/material/Select';
|
|
3
3
|
import { GridRenderEditCellParams } from '../../models/params/gridCellParams';
|
|
4
4
|
import { GridSingleSelectColDef } from '../../models/colDef/gridColDef';
|
|
@@ -15,9 +15,9 @@ export interface GridEditSingleSelectCellProps extends GridRenderEditCellParams,
|
|
|
15
15
|
*/
|
|
16
16
|
initialOpen?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare function GridEditSingleSelectCell(props: GridEditSingleSelectCellProps): JSX.Element | null;
|
|
18
|
+
declare function GridEditSingleSelectCell(props: GridEditSingleSelectCellProps): React.JSX.Element | null;
|
|
19
19
|
declare namespace GridEditSingleSelectCell {
|
|
20
20
|
var propTypes: any;
|
|
21
21
|
}
|
|
22
22
|
export { GridEditSingleSelectCell };
|
|
23
|
-
export declare const renderEditSingleSelectCell: (params: GridEditSingleSelectCellProps) => JSX.Element;
|
|
23
|
+
export declare const renderEditSingleSelectCell: (params: GridEditSingleSelectCellProps) => React.JSX.Element;
|
|
@@ -5,6 +5,7 @@ const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowN
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
8
|
+
import { GridCellEditStopReasons } from '../../models/params/gridEditCellParams';
|
|
8
9
|
import { isEscapeKey } from '../../utils/keyboardUtils';
|
|
9
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
10
11
|
import { GridEditModes } from '../../models/gridEditRowModel';
|
|
@@ -90,11 +91,10 @@ function GridEditSingleSelectCell(props) {
|
|
|
90
91
|
return;
|
|
91
92
|
}
|
|
92
93
|
if (reason === 'backdropClick' || isEscapeKey(event.key)) {
|
|
93
|
-
apiRef.current.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
});
|
|
94
|
+
const params = apiRef.current.getCellParams(id, field);
|
|
95
|
+
apiRef.current.publishEvent('cellEditStop', _extends({}, params, {
|
|
96
|
+
reason: isEscapeKey(event.key) ? GridCellEditStopReasons.escapeKeyDown : GridCellEditStopReasons.cellFocusOut
|
|
97
|
+
}));
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
const handleOpen = event => {
|
|
@@ -5,7 +5,7 @@ export interface GridSkeletonCellProps {
|
|
|
5
5
|
field: string;
|
|
6
6
|
align: string;
|
|
7
7
|
}
|
|
8
|
-
declare function GridSkeletonCell(props: React.HTMLAttributes<HTMLDivElement> & GridSkeletonCellProps): JSX.Element;
|
|
8
|
+
declare function GridSkeletonCell(props: React.HTMLAttributes<HTMLDivElement> & GridSkeletonCellProps): React.JSX.Element;
|
|
9
9
|
declare namespace GridSkeletonCell {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -7,4 +7,4 @@ export interface ColumnHeaderMenuIconProps {
|
|
|
7
7
|
open: boolean;
|
|
8
8
|
iconButtonRef: React.RefObject<HTMLButtonElement>;
|
|
9
9
|
}
|
|
10
|
-
export declare const ColumnHeaderMenuIcon: React.MemoExoticComponent<(props: ColumnHeaderMenuIconProps) => JSX.Element>;
|
|
10
|
+
export declare const ColumnHeaderMenuIcon: React.MemoExoticComponent<(props: ColumnHeaderMenuIconProps) => React.JSX.Element>;
|
|
@@ -49,9 +49,9 @@ export const ColumnHeaderMenuIcon = /*#__PURE__*/React.memo(props => {
|
|
|
49
49
|
"aria-label": apiRef.current.getLocaleText('columnMenuLabel'),
|
|
50
50
|
size: "small",
|
|
51
51
|
onClick: handleMenuIconClick,
|
|
52
|
-
"aria-
|
|
53
|
-
"aria-
|
|
54
|
-
"aria-controls": columnMenuId,
|
|
52
|
+
"aria-haspopup": "menu",
|
|
53
|
+
"aria-expanded": open,
|
|
54
|
+
"aria-controls": open ? columnMenuId : undefined,
|
|
55
55
|
id: columnMenuButtonId
|
|
56
56
|
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseIconButton, {
|
|
57
57
|
children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuIcon, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
interface GridColumnGroupHeaderProps {
|
|
3
3
|
groupId: string | null;
|
|
4
4
|
width: number;
|
|
@@ -11,5 +11,5 @@ interface GridColumnGroupHeaderProps {
|
|
|
11
11
|
hasFocus?: boolean;
|
|
12
12
|
tabIndex: 0 | -1;
|
|
13
13
|
}
|
|
14
|
-
declare function GridColumnGroupHeader(props: GridColumnGroupHeaderProps): JSX.Element;
|
|
14
|
+
declare function GridColumnGroupHeader(props: GridColumnGroupHeaderProps): React.JSX.Element;
|
|
15
15
|
export { GridColumnGroupHeader };
|
|
@@ -5,7 +5,7 @@ export interface ColumnHeaderFilterIconButtonProps {
|
|
|
5
5
|
counter?: number;
|
|
6
6
|
onClick?: (params: GridColumnHeaderParams, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
}
|
|
8
|
-
declare function GridColumnHeaderFilterIconButton(props: ColumnHeaderFilterIconButtonProps): JSX.Element | null;
|
|
8
|
+
declare function GridColumnHeaderFilterIconButton(props: ColumnHeaderFilterIconButtonProps): React.JSX.Element | null;
|
|
9
9
|
declare namespace GridColumnHeaderFilterIconButton {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
4
|
+
import { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';
|
|
5
5
|
import Badge from '@mui/material/Badge';
|
|
6
|
+
import { useGridSelector } from '../../hooks';
|
|
6
7
|
import { gridPreferencePanelStateSelector } from '../../hooks/features/preferencesPanel/gridPreferencePanelSelector';
|
|
7
8
|
import { GridPreferencePanelsValue } from '../../hooks/features/preferencesPanel/gridPreferencePanelsValue';
|
|
8
9
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
@@ -33,6 +34,9 @@ function GridColumnHeaderFilterIconButton(props) {
|
|
|
33
34
|
classes: rootProps.classes
|
|
34
35
|
});
|
|
35
36
|
const classes = useUtilityClasses(ownerState);
|
|
37
|
+
const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
38
|
+
const labelId = useId();
|
|
39
|
+
const panelId = useId();
|
|
36
40
|
const toggleFilter = React.useCallback(event => {
|
|
37
41
|
event.preventDefault();
|
|
38
42
|
event.stopPropagation();
|
|
@@ -43,21 +47,26 @@ function GridColumnHeaderFilterIconButton(props) {
|
|
|
43
47
|
if (open && openedPanelValue === GridPreferencePanelsValue.filters) {
|
|
44
48
|
apiRef.current.hideFilterPanel();
|
|
45
49
|
} else {
|
|
46
|
-
apiRef.current.showFilterPanel();
|
|
50
|
+
apiRef.current.showFilterPanel(undefined, panelId, labelId);
|
|
47
51
|
}
|
|
48
52
|
if (onClick) {
|
|
49
53
|
onClick(apiRef.current.getColumnHeaderParams(field), event);
|
|
50
54
|
}
|
|
51
|
-
}, [apiRef, field, onClick]);
|
|
55
|
+
}, [apiRef, field, onClick, panelId, labelId]);
|
|
52
56
|
if (!counter) {
|
|
53
57
|
return null;
|
|
54
58
|
}
|
|
59
|
+
const open = preferencePanel.open && preferencePanel.labelId === labelId;
|
|
55
60
|
const iconButton = /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
61
|
+
id: labelId,
|
|
56
62
|
onClick: toggleFilter,
|
|
57
63
|
color: "default",
|
|
58
64
|
"aria-label": apiRef.current.getLocaleText('columnHeaderFiltersLabel'),
|
|
59
65
|
size: "small",
|
|
60
|
-
tabIndex: -1
|
|
66
|
+
tabIndex: -1,
|
|
67
|
+
"aria-haspopup": "menu",
|
|
68
|
+
"aria-expanded": open,
|
|
69
|
+
"aria-controls": open ? panelId : undefined
|
|
61
70
|
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
|
62
71
|
children: /*#__PURE__*/_jsx(rootProps.slots.columnFilteredIcon, {
|
|
63
72
|
className: classes.icon,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridStateColDef } from '../../models/colDef/gridColDef';
|
|
3
3
|
import { GridSortDirection } from '../../models/gridSortModel';
|
|
4
4
|
import { GridColumnHeaderSeparatorProps } from './GridColumnHeaderSeparator';
|
|
@@ -17,7 +17,7 @@ interface GridColumnHeaderItemProps {
|
|
|
17
17
|
disableReorder?: boolean;
|
|
18
18
|
separatorSide?: GridColumnHeaderSeparatorProps['side'];
|
|
19
19
|
}
|
|
20
|
-
declare function GridColumnHeaderItem(props: GridColumnHeaderItemProps): JSX.Element;
|
|
20
|
+
declare function GridColumnHeaderItem(props: GridColumnHeaderItemProps): React.JSX.Element;
|
|
21
21
|
declare namespace GridColumnHeaderItem {
|
|
22
22
|
var propTypes: any;
|
|
23
23
|
}
|
|
@@ -9,7 +9,7 @@ export interface GridColumnHeaderSeparatorProps extends React.HTMLAttributes<HTM
|
|
|
9
9
|
height: number;
|
|
10
10
|
side?: GridColumnHeaderSeparatorSides;
|
|
11
11
|
}
|
|
12
|
-
declare function GridColumnHeaderSeparatorRaw(props: GridColumnHeaderSeparatorProps): JSX.Element;
|
|
12
|
+
declare function GridColumnHeaderSeparatorRaw(props: GridColumnHeaderSeparatorProps): React.JSX.Element;
|
|
13
13
|
declare namespace GridColumnHeaderSeparatorRaw {
|
|
14
14
|
var propTypes: any;
|
|
15
15
|
}
|
|
@@ -5,7 +5,7 @@ export interface GridColumnHeaderSortIconProps {
|
|
|
5
5
|
index: number | undefined;
|
|
6
6
|
sortingOrder: GridSortDirection[];
|
|
7
7
|
}
|
|
8
|
-
declare function GridColumnHeaderSortIconRaw(props: GridColumnHeaderSortIconProps): JSX.Element | null;
|
|
8
|
+
declare function GridColumnHeaderSortIconRaw(props: GridColumnHeaderSortIconProps): React.JSX.Element | null;
|
|
9
9
|
declare namespace GridColumnHeaderSortIconRaw {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -4,7 +4,7 @@ export interface GridColumnHeaderTitleProps {
|
|
|
4
4
|
columnWidth: number;
|
|
5
5
|
description?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare function GridColumnHeaderTitle(props: GridColumnHeaderTitleProps): JSX.Element;
|
|
7
|
+
declare function GridColumnHeaderTitle(props: GridColumnHeaderTitleProps): React.JSX.Element;
|
|
8
8
|
declare namespace GridColumnHeaderTitle {
|
|
9
9
|
var propTypes: any;
|
|
10
10
|
}
|
|
@@ -64,9 +64,7 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
|
|
|
64
64
|
role: "grid",
|
|
65
65
|
"aria-colcount": visibleColumns.length,
|
|
66
66
|
"aria-rowcount": headerGroupingMaxDepth + 1 + pinnedRowsCount + totalRowCount,
|
|
67
|
-
"aria-multiselectable": !rootProps.disableMultipleRowSelection
|
|
68
|
-
"aria-label": rootProps['aria-label'],
|
|
69
|
-
"aria-labelledby": rootProps['aria-labelledby']
|
|
67
|
+
"aria-multiselectable": !rootProps.disableMultipleRowSelection
|
|
70
68
|
}, other, {
|
|
71
69
|
children: children
|
|
72
70
|
}));
|
|
@@ -77,6 +77,8 @@ export const GridRootStyles = styled('div', {
|
|
|
77
77
|
[`& .${gridClasses['columnHeader--sorted']}`]: styles['columnHeader--sorted']
|
|
78
78
|
}, {
|
|
79
79
|
[`& .${gridClasses.columnHeader}`]: styles.columnHeader
|
|
80
|
+
}, {
|
|
81
|
+
[`& .${gridClasses.headerFilterRow}`]: styles.headerFilterRow
|
|
80
82
|
}, {
|
|
81
83
|
[`& .${gridClasses.columnHeaderCheckbox}`]: styles.columnHeaderCheckbox
|
|
82
84
|
}, {
|
|
@@ -149,7 +151,9 @@ export const GridRootStyles = styled('div', {
|
|
|
149
151
|
outline: 'none',
|
|
150
152
|
height: '100%',
|
|
151
153
|
display: 'flex',
|
|
152
|
-
|
|
154
|
+
minWidth: 0,
|
|
155
|
+
// See https://github.com/mui/mui-x/issues/8547
|
|
156
|
+
minHeight: 0,
|
|
153
157
|
flexDirection: 'column',
|
|
154
158
|
overflowAnchor: 'none',
|
|
155
159
|
// Keep the same scrolling position
|
|
@@ -227,6 +231,9 @@ export const GridRootStyles = styled('div', {
|
|
|
227
231
|
borderBottomStyle: 'solid',
|
|
228
232
|
boxSizing: 'border-box'
|
|
229
233
|
},
|
|
234
|
+
[`& .${gridClasses.headerFilterRow}`]: {
|
|
235
|
+
borderTop: `1px solid ${borderColor}`
|
|
236
|
+
},
|
|
230
237
|
[`& .${gridClasses.sortIcon}, & .${gridClasses.filterIcon}`]: {
|
|
231
238
|
fontSize: 'inherit'
|
|
232
239
|
},
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -11,7 +11,7 @@ export interface GridMenuProps extends Omit<PopperProps, 'onKeyDown' | 'children
|
|
|
11
11
|
onExited?: GrowProps['onExited'];
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
declare function GridMenu(props: GridMenuProps): JSX.Element;
|
|
14
|
+
declare function GridMenu(props: GridMenuProps): React.JSX.Element;
|
|
15
15
|
declare namespace GridMenu {
|
|
16
16
|
var propTypes: any;
|
|
17
17
|
}
|
|
@@ -10,7 +10,7 @@ export interface GridColumnHeaderMenuProps {
|
|
|
10
10
|
target: HTMLElement | null;
|
|
11
11
|
onExited?: GridMenuProps['onExited'];
|
|
12
12
|
}
|
|
13
|
-
declare function GridColumnHeaderMenu({ columnMenuId, columnMenuButtonId, ContentComponent, contentComponentProps, field, open, target, onExited, }: GridColumnHeaderMenuProps): JSX.Element | null;
|
|
13
|
+
declare function GridColumnHeaderMenu({ columnMenuId, columnMenuButtonId, ContentComponent, contentComponentProps, field, open, target, onExited, }: GridColumnHeaderMenuProps): React.JSX.Element | null;
|
|
14
14
|
declare namespace GridColumnHeaderMenu {
|
|
15
15
|
var propTypes: any;
|
|
16
16
|
}
|