@mui/x-data-grid 6.6.0 → 6.8.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 +147 -13
- package/components/GridColumnHeaders.d.ts +2 -2
- package/components/GridColumnHeaders.js +3 -1
- package/components/GridRow.d.ts +2 -2
- package/components/GridRow.js +23 -69
- package/components/cell/GridCell.d.ts +24 -15
- package/components/cell/GridCell.js +422 -45
- package/components/cell/index.d.ts +2 -1
- package/components/cell/index.js +1 -1
- package/components/containers/GridRootStyles.js +38 -17
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/components/panel/GridColumnsPanel.d.ts +14 -0
- package/components/panel/GridColumnsPanel.js +14 -0
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +0 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +0 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +1 -6
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +0 -1
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +5 -6
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +0 -1
- 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/GridToolbar.js +2 -2
- package/components/virtualization/GridVirtualScroller.js +4 -9
- package/components/virtualization/GridVirtualScrollerContent.js +11 -20
- package/constants/defaultGridSlotsComponents.js +6 -2
- package/constants/gridClasses.d.ts +4 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +4 -4
- package/hooks/core/useGridApiInitialization.js +4 -1
- package/hooks/core/useGridStateInitialization.js +2 -9
- package/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/hooks/features/editing/useGridCellEditing.js +5 -3
- package/hooks/features/editing/useGridRowEditing.js +14 -6
- package/hooks/features/filter/gridFilterUtils.d.ts +4 -1
- package/hooks/features/filter/gridFilterUtils.js +19 -13
- package/hooks/features/filter/useGridFilter.js +4 -2
- package/hooks/features/focus/useGridFocus.js +10 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -0
- package/hooks/features/rows/useGridParamsApi.js +7 -15
- package/hooks/features/rows/useGridRowsMeta.js +1 -1
- package/hooks/features/sorting/useGridSorting.js +2 -1
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +8 -816
- package/hooks/features/virtualization/useGridVirtualScroller.js +42 -40
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/useGridSelector.d.ts +3 -1
- package/hooks/utils/useGridSelector.js +37 -6
- package/hooks/utils/useLazyRef.d.ts +2 -0
- package/hooks/utils/useLazyRef.js +9 -0
- package/hooks/utils/useOnMount.d.ts +2 -0
- package/hooks/utils/useOnMount.js +7 -0
- package/index.js +1 -1
- package/legacy/components/GridColumnHeaders.js +3 -1
- package/legacy/components/GridRow.js +25 -69
- package/legacy/components/cell/GridCell.js +425 -46
- package/legacy/components/cell/index.js +1 -1
- package/legacy/components/containers/GridRootStyles.js +25 -18
- package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/legacy/components/panel/GridColumnsPanel.js +14 -0
- 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 +6 -6
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +1 -5
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/legacy/components/toolbar/GridToolbar.js +2 -2
- package/legacy/components/virtualization/GridVirtualScroller.js +4 -7
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +10 -17
- package/legacy/constants/defaultGridSlotsComponents.js +6 -2
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +4 -4
- package/legacy/hooks/core/useGridApiInitialization.js +4 -1
- package/legacy/hooks/core/useGridStateInitialization.js +2 -7
- package/legacy/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/legacy/hooks/features/editing/useGridCellEditing.js +5 -3
- package/legacy/hooks/features/editing/useGridRowEditing.js +15 -7
- package/legacy/hooks/features/filter/gridFilterUtils.js +23 -19
- package/legacy/hooks/features/filter/useGridFilter.js +4 -2
- package/legacy/hooks/features/focus/useGridFocus.js +10 -4
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/legacy/hooks/features/rows/useGridParamsApi.js +23 -15
- package/legacy/hooks/features/rows/useGridRowsMeta.js +1 -1
- package/legacy/hooks/features/sorting/useGridSorting.js +2 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +40 -36
- package/legacy/hooks/utils/index.js +1 -1
- package/legacy/hooks/utils/useGridSelector.js +43 -5
- package/legacy/hooks/utils/useLazyRef.js +9 -0
- package/legacy/hooks/utils/useOnMount.js +7 -0
- package/legacy/index.js +1 -1
- package/legacy/locales/arSD.js +4 -4
- package/legacy/locales/beBY.js +4 -4
- package/legacy/locales/bgBG.js +4 -4
- package/legacy/locales/csCZ.js +25 -27
- package/legacy/locales/daDK.js +4 -4
- package/legacy/locales/deDE.js +25 -27
- package/legacy/locales/elGR.js +70 -79
- package/legacy/locales/esES.js +4 -4
- package/legacy/locales/faIR.js +4 -4
- package/legacy/locales/fiFI.js +4 -4
- package/legacy/locales/heIL.js +4 -4
- package/legacy/locales/huHU.js +4 -4
- package/legacy/locales/itIT.js +4 -4
- package/legacy/locales/jaJP.js +4 -4
- package/legacy/locales/koKR.js +4 -4
- package/legacy/locales/nbNO.js +4 -4
- package/legacy/locales/plPL.js +4 -4
- package/legacy/locales/ptBR.js +4 -4
- package/legacy/locales/roRO.js +4 -4
- package/legacy/locales/ruRU.js +4 -4
- package/legacy/locales/skSK.js +4 -4
- package/legacy/locales/svSE.js +4 -4
- package/legacy/locales/trTR.js +16 -17
- package/legacy/locales/ukUA.js +4 -4
- package/legacy/locales/urPK.js +4 -4
- package/legacy/locales/viVN.js +4 -4
- package/legacy/locales/zhCN.js +4 -4
- package/legacy/locales/zhTW.js +4 -4
- package/legacy/utils/EventManager.js +2 -2
- package/legacy/utils/Store.js +34 -0
- package/legacy/utils/doesSupportPreventScroll.js +13 -0
- package/legacy/utils/fastMemo.js +5 -0
- package/legacy/utils/fastObjectShallowCompare.js +32 -0
- package/legacy/utils/keyboardUtils.js +4 -2
- package/locales/arSD.js +4 -4
- package/locales/beBY.js +4 -4
- package/locales/bgBG.js +4 -4
- package/locales/csCZ.js +25 -27
- package/locales/daDK.js +4 -4
- package/locales/deDE.js +25 -27
- package/locales/elGR.js +66 -79
- package/locales/esES.js +4 -4
- package/locales/faIR.js +4 -4
- package/locales/fiFI.js +4 -4
- package/locales/heIL.js +4 -4
- package/locales/huHU.js +4 -4
- package/locales/itIT.js +4 -4
- package/locales/jaJP.js +4 -4
- package/locales/koKR.js +4 -4
- package/locales/nbNO.js +4 -4
- package/locales/plPL.js +4 -4
- package/locales/ptBR.js +4 -4
- package/locales/roRO.js +4 -4
- package/locales/ruRU.js +4 -4
- package/locales/skSK.js +4 -4
- package/locales/svSE.js +4 -4
- package/locales/trTR.js +16 -17
- package/locales/ukUA.js +4 -4
- package/locales/urPK.js +4 -4
- package/locales/viVN.js +4 -4
- package/locales/zhCN.js +4 -4
- package/locales/zhTW.js +4 -4
- package/models/api/gridCoreApi.d.ts +6 -0
- package/models/colDef/gridColDef.d.ts +4 -3
- package/models/colDef/gridColType.d.ts +3 -1
- package/models/events/gridEventLookup.d.ts +11 -3
- package/modern/components/GridColumnHeaders.js +3 -1
- package/modern/components/GridRow.js +22 -69
- package/modern/components/cell/GridCell.js +421 -45
- package/modern/components/cell/index.js +1 -1
- package/modern/components/containers/GridRootStyles.js +38 -17
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/modern/components/panel/GridColumnsPanel.js +14 -0
- 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 +5 -6
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -6
- package/modern/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/modern/components/toolbar/GridToolbar.js +2 -2
- package/modern/components/virtualization/GridVirtualScroller.js +4 -9
- package/modern/components/virtualization/GridVirtualScrollerContent.js +10 -20
- package/modern/constants/defaultGridSlotsComponents.js +6 -2
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +4 -4
- package/modern/hooks/core/useGridApiInitialization.js +4 -1
- package/modern/hooks/core/useGridStateInitialization.js +2 -9
- package/modern/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/modern/hooks/features/editing/useGridCellEditing.js +5 -3
- package/modern/hooks/features/editing/useGridRowEditing.js +14 -6
- package/modern/hooks/features/filter/gridFilterUtils.js +17 -12
- package/modern/hooks/features/filter/useGridFilter.js +4 -2
- package/modern/hooks/features/focus/useGridFocus.js +9 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/modern/hooks/features/rows/useGridParamsApi.js +7 -15
- package/modern/hooks/features/rows/useGridRowsMeta.js +1 -1
- package/modern/hooks/features/sorting/useGridSorting.js +2 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +42 -40
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +37 -6
- package/modern/hooks/utils/useLazyRef.js +9 -0
- package/modern/hooks/utils/useOnMount.js +7 -0
- package/modern/index.js +1 -1
- package/modern/locales/arSD.js +4 -4
- package/modern/locales/beBY.js +4 -4
- package/modern/locales/bgBG.js +4 -4
- package/modern/locales/csCZ.js +25 -27
- package/modern/locales/daDK.js +4 -4
- package/modern/locales/deDE.js +25 -27
- package/modern/locales/elGR.js +66 -79
- package/modern/locales/esES.js +4 -4
- package/modern/locales/faIR.js +4 -4
- package/modern/locales/fiFI.js +4 -4
- package/modern/locales/heIL.js +4 -4
- package/modern/locales/huHU.js +4 -4
- package/modern/locales/itIT.js +4 -4
- package/modern/locales/jaJP.js +4 -4
- package/modern/locales/koKR.js +4 -4
- package/modern/locales/nbNO.js +4 -4
- package/modern/locales/plPL.js +4 -4
- package/modern/locales/ptBR.js +4 -4
- package/modern/locales/roRO.js +4 -4
- package/modern/locales/ruRU.js +4 -4
- package/modern/locales/skSK.js +4 -4
- package/modern/locales/svSE.js +4 -4
- package/modern/locales/trTR.js +16 -17
- package/modern/locales/ukUA.js +4 -4
- package/modern/locales/urPK.js +4 -4
- package/modern/locales/viVN.js +4 -4
- package/modern/locales/zhCN.js +4 -4
- package/modern/locales/zhTW.js +4 -4
- package/modern/utils/EventManager.js +2 -2
- package/modern/utils/Store.js +24 -0
- package/modern/utils/doesSupportPreventScroll.js +13 -0
- package/modern/utils/fastMemo.js +5 -0
- package/modern/utils/fastObjectShallowCompare.js +32 -0
- package/modern/utils/keyboardUtils.js +4 -2
- package/node/components/GridColumnHeaders.js +4 -2
- package/node/components/GridRow.js +22 -69
- package/node/components/cell/GridCell.js +424 -47
- package/node/components/cell/index.js +17 -10
- package/node/components/containers/GridRootStyles.js +38 -17
- package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/node/components/panel/GridColumnsPanel.js +14 -0
- 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 +5 -6
- package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -6
- package/node/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/node/components/toolbar/GridToolbar.js +2 -2
- package/node/components/virtualization/GridVirtualScroller.js +4 -9
- package/node/components/virtualization/GridVirtualScrollerContent.js +10 -20
- package/node/constants/defaultGridSlotsComponents.js +4 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +4 -4
- package/node/hooks/core/useGridApiInitialization.js +4 -1
- package/node/hooks/core/useGridStateInitialization.js +2 -9
- package/node/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +8 -2
- package/node/hooks/features/editing/useGridCellEditing.js +5 -3
- package/node/hooks/features/editing/useGridRowEditing.js +14 -6
- package/node/hooks/features/filter/gridFilterUtils.js +17 -12
- package/node/hooks/features/filter/useGridFilter.js +7 -5
- package/node/hooks/features/focus/useGridFocus.js +9 -4
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/node/hooks/features/rows/useGridParamsApi.js +9 -15
- package/node/hooks/features/rows/useGridRowsMeta.js +1 -1
- package/node/hooks/features/sorting/useGridSorting.js +2 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +42 -38
- package/node/hooks/utils/index.js +14 -10
- package/node/hooks/utils/useGridSelector.js +41 -7
- package/node/hooks/utils/useLazyRef.js +17 -0
- package/node/hooks/utils/useOnMount.js +15 -0
- package/node/index.js +1 -1
- package/node/locales/arSD.js +4 -4
- package/node/locales/beBY.js +4 -4
- package/node/locales/bgBG.js +4 -4
- package/node/locales/csCZ.js +25 -27
- package/node/locales/daDK.js +4 -4
- package/node/locales/deDE.js +25 -27
- package/node/locales/elGR.js +66 -79
- package/node/locales/esES.js +4 -4
- package/node/locales/faIR.js +4 -4
- package/node/locales/fiFI.js +4 -4
- package/node/locales/heIL.js +4 -4
- package/node/locales/huHU.js +4 -4
- package/node/locales/itIT.js +4 -4
- package/node/locales/jaJP.js +4 -4
- package/node/locales/koKR.js +4 -4
- package/node/locales/nbNO.js +4 -4
- package/node/locales/plPL.js +4 -4
- package/node/locales/ptBR.js +4 -4
- package/node/locales/roRO.js +4 -4
- package/node/locales/ruRU.js +4 -4
- package/node/locales/skSK.js +4 -4
- package/node/locales/svSE.js +4 -4
- package/node/locales/trTR.js +16 -17
- package/node/locales/ukUA.js +4 -4
- package/node/locales/urPK.js +4 -4
- package/node/locales/viVN.js +4 -4
- package/node/locales/zhCN.js +4 -4
- package/node/locales/zhTW.js +4 -4
- package/node/utils/EventManager.js +2 -2
- package/node/utils/Store.js +31 -0
- package/node/utils/doesSupportPreventScroll.js +19 -0
- package/node/utils/fastMemo.js +13 -0
- package/node/utils/fastObjectShallowCompare.js +38 -0
- package/node/utils/keyboardUtils.js +4 -2
- package/package.json +1 -1
- package/themeAugmentation/overrides.d.ts +1 -1
- package/utils/EventManager.js +2 -2
- package/utils/Store.d.ts +11 -0
- package/utils/Store.js +24 -0
- package/utils/doesSupportPreventScroll.d.ts +1 -0
- package/utils/doesSupportPreventScroll.js +13 -0
- package/utils/fastMemo.d.ts +1 -0
- package/utils/fastMemo.js +5 -0
- package/utils/fastObjectShallowCompare.d.ts +1 -0
- package/utils/fastObjectShallowCompare.js +32 -0
- package/utils/keyboardUtils.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,140 @@
|
|
|
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.8.0
|
|
7
|
+
|
|
8
|
+
_Jun 16, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Add Greek (el-GR) locale on Pickers and improve on Data Grid
|
|
13
|
+
- 🚅 Performance improvements
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
### `@mui/x-data-grid@6.8.0` / `@mui/x-data-grid-pro@6.8.0` / `@mui/x-data-grid-premium@6.8.0`
|
|
18
|
+
|
|
19
|
+
#### Changes
|
|
20
|
+
|
|
21
|
+
- [DataGrid] Add missing styles to `overridesResolver` (#9248) @mrmuhammadali
|
|
22
|
+
- [DataGrid] Keep column header menu icon always visible on touch devices (#9076) @cherniavskii
|
|
23
|
+
- [DataGrid] Correct the type for single digit edited number value (#9282) @MBilalShafi
|
|
24
|
+
- [DataGrid] Correct the type for single digit edited number for row edit (#9348) @MBilalShafi
|
|
25
|
+
- [DataGrid] Filtering performance: cache values (#9284) @romgrk
|
|
26
|
+
- [DataGrid] Fix tabbing between `actions` cells in edit mode (#9321) @md250721
|
|
27
|
+
- [DataGrid] Make autocompletion work for `GridColDef['type']` (#9320) @cherniavskii
|
|
28
|
+
- [DataGrid] Polish shortcut logic (#9220) @oliviertassinari
|
|
29
|
+
- [DataGrid] Row reordering fix for different row heights (#7006) @yaredtsy
|
|
30
|
+
- [DataGrid] Scroll performance improvements (#9037) @romgrk
|
|
31
|
+
- [l10n] Improve Greek (el-GR) locale (#9292) @clytras
|
|
32
|
+
|
|
33
|
+
### `@mui/x-date-pickers@6.8.0` / `@mui/x-date-pickers-pro@6.8.0`
|
|
34
|
+
|
|
35
|
+
#### Changes
|
|
36
|
+
|
|
37
|
+
- [l10n] Add Greek (el-GR) locale (#9293) @clytras
|
|
38
|
+
- [pickers] Add a `referenceDate` prop on `DateCalendar`, `MonthCalendar` and `YearCalendar` (#9260) @flaviendelangle
|
|
39
|
+
- [pickers] Close the calendar when a shortcut is selected (#9080) @flaviendelangle
|
|
40
|
+
- [pickers] Fix disabling for digital clock (#9300) @alexfauquette
|
|
41
|
+
|
|
42
|
+
### Docs
|
|
43
|
+
|
|
44
|
+
- [docs] Add header filters to the popular features demo (#9069) @MBilalShafi
|
|
45
|
+
- [docs] Fix `Date Calendar` dynamic data demo (#9290) @benzler
|
|
46
|
+
- [docs] Fix Data Grid header filter link (#9225) @oliviertassinari
|
|
47
|
+
- [docs] Fix missing docs version warning (#9221) @oliviertassinari
|
|
48
|
+
- [docs] Improve Chart overview (#9333) @oliviertassinari
|
|
49
|
+
- [docs] Improve Next.js license installation guide (#8975) @oliviertassinari
|
|
50
|
+
- [docs] Link pagination documentation to the migration guide (#9296) @MBilalShafi
|
|
51
|
+
- [docs] One step toward components -> slots (#9251) @oliviertassinari
|
|
52
|
+
- [docs] Improve and reorganize sections on editing page (#8431) @joserodolfofreitas
|
|
53
|
+
- [docs] Add clipboard paste to popular features demo (#9029) @cherniavskii
|
|
54
|
+
|
|
55
|
+
### Core
|
|
56
|
+
|
|
57
|
+
- [core] Polish event name (#9336) @oliviertassinari
|
|
58
|
+
- [core] Re-enable `Argos` CI step (#9301) @LukasTy
|
|
59
|
+
- [core] Upgrade Node.js to v18 on CircleCI, CodeSandbox and Netlify (#9319) @ZeeshanTamboli
|
|
60
|
+
- [core] Upgrade Node.js v18 for l10n GitHub CI (#9355) @ZeeshanTamboli
|
|
61
|
+
- [charts] Add demonstration pages based on Recharts demo (#9175) @alexfauquette
|
|
62
|
+
- [charts] Add legend (#9024) @alexfauquette
|
|
63
|
+
- [charts] Complete the docs to introduce charts (#9153) @alexfauquette
|
|
64
|
+
- [charts] Manage elements highlights (#9242) @alexfauquette
|
|
65
|
+
- [charts] Prefix subcomponents with `Charts` (#9314) @alexfauquette
|
|
66
|
+
- [license] Improve annual license expiration message (#9135) @oliviertassinari
|
|
67
|
+
|
|
68
|
+
## 6.7.0
|
|
69
|
+
|
|
70
|
+
_Jun 9, 2023_
|
|
71
|
+
|
|
72
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
73
|
+
|
|
74
|
+
- 🎁 Improve the default `format` prop value on the pickers.
|
|
75
|
+
|
|
76
|
+
Here are a few examples:
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
<TimePicker views={['hours', 'minutes', 'seconds']} ampm />
|
|
80
|
+
// Format before v6.7.0: `hh:mm aa`
|
|
81
|
+
// Format after v6.7.0: `hh:mm:ss aa`
|
|
82
|
+
|
|
83
|
+
<DatePicker views={['year']} />
|
|
84
|
+
// Format before v6.7.0: `MM/DD/YYYY`
|
|
85
|
+
// Format after v6.7.0: `YYYY`
|
|
86
|
+
|
|
87
|
+
<DateTimePicker views={['day', 'hours', 'minutes']} ampm />
|
|
88
|
+
// Format before v6.7.0: `MM/DD/YYYY hh:mm aa`
|
|
89
|
+
// Format after v6.7.0: `DD hh:mm aa`
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- 🌍 Add Romanian (ro-RO) locale on the pickers
|
|
93
|
+
- 🌍 Improve German (de-DE) locale on the pickers
|
|
94
|
+
- 🌍 Improve Czech (cs-CZ), German (de-DE) and Turkish (tr-TR) locales on the data grid
|
|
95
|
+
- 🚀 Performance improvements
|
|
96
|
+
- 🐞 Bugfixes
|
|
97
|
+
- 📚 Documentation improvements
|
|
98
|
+
|
|
99
|
+
### `@mui/x-data-grid@v6.7.0` / `@mui/x-data-grid-pro@v6.7.0` / `@mui/x-data-grid-premium@v6.7.0`
|
|
100
|
+
|
|
101
|
+
#### Changes
|
|
102
|
+
|
|
103
|
+
- [DataGrid] Allow overflowing grid root element (#9179) @cherniavskii
|
|
104
|
+
- [DataGrid] Fix module augmentation error when using `@mui/lab` (#9235) @cherniavskii
|
|
105
|
+
- [DataGrid] Fix row with ids matching `Object` prototype (#9265) @romgrk
|
|
106
|
+
- [DataGrid] Fix `sortModel` and `filterModel` resetting when columns change (#9239) @alexgonch
|
|
107
|
+
- [DataGrid] Improve grouping performance for large datasets (#9200) @romgrk
|
|
108
|
+
- [DataGrid] Increase threshold to trigger memory leak warning (#9263) @m4theushw
|
|
109
|
+
- [DataGrid] Update data grid migration guide to include updated type (#9272) @MBilalShafi
|
|
110
|
+
- [DataGridPro] Improve header filter menu visuals (#9181) @MBilalShafi
|
|
111
|
+
- [DataGridPremium] Remove last line break on clipboard paste (#9163) @cherniavskii
|
|
112
|
+
- [l10n] Improve Czech (cs-CZ) locale (#9266) @MartinSkarpa
|
|
113
|
+
- [l10n] Improve German (de-DE) locale (#9259) @ximex
|
|
114
|
+
- [l10n] Improve Turkish (tr-TR) locale (#9237) @MCErtan
|
|
115
|
+
|
|
116
|
+
### `@mui/x-date-pickers@v6.7.0` / `@mui/x-date-pickers-pro@v6.7.0`
|
|
117
|
+
|
|
118
|
+
#### Changes
|
|
119
|
+
|
|
120
|
+
- [l10n] Add Romanian (ro-RO) locale (#9257) @ximex
|
|
121
|
+
- [l10n] Improve German (de-DE) locale (#9258) @ximex
|
|
122
|
+
- [pickers] Apply dynamic default format depending on views for all desktop and mobile pickers (#9126) @flaviendelangle
|
|
123
|
+
- [pickers] Update `DateRangePickerDay` props JSDoc (#9191) @stevus
|
|
124
|
+
|
|
125
|
+
### Docs
|
|
126
|
+
|
|
127
|
+
- [docs] Fix missing props on the `GridFilterPanel` API page (#9180) @cherniavskii
|
|
128
|
+
- [docs] Fix overview page typo (#9230) @LukasTy
|
|
129
|
+
- [docs] Fix version redirect (#9273) @alexfauquette
|
|
130
|
+
|
|
131
|
+
### Core
|
|
132
|
+
|
|
133
|
+
- [core] Temporarily remove the Argos upload on the regression testing (#9267) @flaviendelangle
|
|
134
|
+
- [charts] Add clip-path to avoid charts overflow (#9012) @alexfauquette
|
|
135
|
+
- [charts] Add style customization on bar (#8935) @alexfauquette
|
|
136
|
+
- [charts] Enforce axis `min`/`max` over the `nice()` method (#9189) @alexfauquette
|
|
137
|
+
- [charts] Improve axis label and ticks label alignements (#9190) @alexfauquette
|
|
138
|
+
- [charts] Simplify the switch between responsive and fix dimensions (#9151) @alexfauquette
|
|
139
|
+
|
|
6
140
|
## 6.6.0
|
|
7
141
|
|
|
8
142
|
_Jun 1, 2023_
|
|
@@ -11,7 +145,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
11
145
|
|
|
12
146
|
- 🚀 New date time picking UI on [`DesktopDateTimePicker`](https://mui.com/x/react-date-pickers/date-time-picker/)
|
|
13
147
|
|
|
14
|
-
<img src="https://
|
|
148
|
+
<img src="https://github.com/mui/mui-x/assets/3165635/4e1fe9f9-03eb-4f23-99dd-80212b21fb23" width="840" height="506" />
|
|
15
149
|
|
|
16
150
|
- 🚀 Performance improvements
|
|
17
151
|
- 🐞 Bugfixes
|
|
@@ -79,7 +213,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
79
213
|
- [charts] Manage series stacking (#8888) @alexfauquette
|
|
80
214
|
- [license] List side effects in the license package (#9092) @cherniavskii
|
|
81
215
|
|
|
82
|
-
##
|
|
216
|
+
## 6.5.0
|
|
83
217
|
|
|
84
218
|
_May 19, 2023_
|
|
85
219
|
|
|
@@ -87,9 +221,9 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
87
221
|
|
|
88
222
|
- 💫 Introduce filtering on column headers for `DataGridPro` and `DataGridPremium`:
|
|
89
223
|
|
|
90
|
-
https://github.com/mui/mui-x/
|
|
224
|
+
<img src="https://github.com/mui/mui-x/releases/download/v6.5.0/recording.gif" width="840" height="506" />
|
|
91
225
|
|
|
92
|
-
See [the documentation](https://mui.com/x/react-data-grid/filtering
|
|
226
|
+
See [the documentation](https://mui.com/x/react-data-grid/filtering/header-filters/) for more information
|
|
93
227
|
|
|
94
228
|
- 🌍 Improve Hebrew (he-IL) and Czech (cs-CZ) locales
|
|
95
229
|
- 📝 Support for editing on pinned rows
|
|
@@ -135,7 +269,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
135
269
|
- [DataGrid] Memoize root props for better performance (#8942) @romgrk
|
|
136
270
|
- [test] Skip flaky unit tests in JSDOM (#8994) @cherniavskii
|
|
137
271
|
|
|
138
|
-
##
|
|
272
|
+
## 6.4.0
|
|
139
273
|
|
|
140
274
|
_May 12, 2023_
|
|
141
275
|
|
|
@@ -4168,7 +4302,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
4168
4302
|
- [docs] Revise and split up "Overview" page into "Introduction" (#4692) @samuelsycamore
|
|
4169
4303
|
- [docs] Use `useKeepGroupedColumnsHiddren` from the grid package on remaining demo (#5382) @flaviendelangle
|
|
4170
4304
|
|
|
4171
|
-
##
|
|
4305
|
+
## 5.12.3
|
|
4172
4306
|
|
|
4173
4307
|
_Jun 23, 2022_
|
|
4174
4308
|
|
|
@@ -4219,7 +4353,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
4219
4353
|
- [test] Throw if date adapter is not found (#5289) @cherniavskii
|
|
4220
4354
|
- [test] Use mock for `ResizeObserver` (#5215) @m4theushw
|
|
4221
4355
|
|
|
4222
|
-
##
|
|
4356
|
+
## 5.12.2
|
|
4223
4357
|
|
|
4224
4358
|
_Jun 16, 2022_
|
|
4225
4359
|
|
|
@@ -4262,7 +4396,7 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
|
|
|
4262
4396
|
- [core] Fix `GridColTypeDef` usage in demo (#5197) @cherniavskii
|
|
4263
4397
|
- [test] Add `waitFor` before asserting height (#5203) @m4theushw
|
|
4264
4398
|
|
|
4265
|
-
##
|
|
4399
|
+
## 5.12.1
|
|
4266
4400
|
|
|
4267
4401
|
_Jun 9, 2022_
|
|
4268
4402
|
|
|
@@ -4319,7 +4453,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
4319
4453
|
- [test] Fix dynamic row height test failing on Chrome (#5147) @m4theushw
|
|
4320
4454
|
- [test] Remove delay on server demo for regression tests (#5131) @alexfauquette
|
|
4321
4455
|
|
|
4322
|
-
##
|
|
4456
|
+
## 5.12.0
|
|
4323
4457
|
|
|
4324
4458
|
_May 31, 2022_
|
|
4325
4459
|
|
|
@@ -4400,7 +4534,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
4400
4534
|
- [test] Skip Safari and Firefox on broken tests (#4994) @alexfauquette
|
|
4401
4535
|
- [test] Make argos screenshots stable (#5061) @m4theushw
|
|
4402
4536
|
|
|
4403
|
-
##
|
|
4537
|
+
## 5.11.1
|
|
4404
4538
|
|
|
4405
4539
|
_May 20, 2022_
|
|
4406
4540
|
|
|
@@ -4492,7 +4626,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
4492
4626
|
- [core] Simplify rows cache management (#4933) @flaviendelangle
|
|
4493
4627
|
- [core] Use internal icons for quick filter (#4912) @alexfauquette
|
|
4494
4628
|
|
|
4495
|
-
##
|
|
4629
|
+
## 5.11.0
|
|
4496
4630
|
|
|
4497
4631
|
_May 13, 2022_
|
|
4498
4632
|
|
|
@@ -4636,7 +4770,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
4636
4770
|
- [test] Reset cleanup tracking on Karma tests (#4679) @m4theushw
|
|
4637
4771
|
- [test] Restore `sinon` sandbox after each `karma` test (#4689) @m4theushw
|
|
4638
4772
|
|
|
4639
|
-
##
|
|
4773
|
+
## 5.10.0
|
|
4640
4774
|
|
|
4641
4775
|
_Apr 25, 2022_
|
|
4642
4776
|
|
|
@@ -4672,7 +4806,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
4672
4806
|
- [core] Fix the README of the X packages (#4590) @flaviendelangle
|
|
4673
4807
|
- [test] Fix test to not depend on screen resolution (#4587) @m4theushw
|
|
4674
4808
|
|
|
4675
|
-
##
|
|
4809
|
+
## 5.9.0
|
|
4676
4810
|
|
|
4677
4811
|
_Apr 14, 2022_
|
|
4678
4812
|
|
|
@@ -3,5 +3,5 @@ import { UseGridColumnHeadersProps } from '../hooks/features/columnHeaders/useGr
|
|
|
3
3
|
interface GridColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement>, Omit<UseGridColumnHeadersProps, 'innerRef'> {
|
|
4
4
|
innerRef?: React.Ref<HTMLDivElement>;
|
|
5
5
|
}
|
|
6
|
-
declare const
|
|
7
|
-
export { GridColumnHeaders };
|
|
6
|
+
declare const MemoizedGridColumnHeaders: React.ForwardRefExoticComponent<GridColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { MemoizedGridColumnHeaders as GridColumnHeaders };
|
|
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["innerRef", "className", "visibleColumns", "sortColumnLookup", "filterColumnLookup", "columnPositions", "columnHeaderTabIndexState", "columnGroupHeaderTabIndexState", "columnHeaderFocus", "columnGroupHeaderFocus", "densityFactor", "headerGroupingMaxDepth", "columnMenuState", "columnVisibility", "columnGroupsHeaderStructure", "hasOtherElementInTabSequence"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { fastMemo } from '../utils/fastMemo';
|
|
6
7
|
import { useGridColumnHeaders } from '../hooks/features/columnHeaders/useGridColumnHeaders';
|
|
7
8
|
import { GridBaseColumnHeaders } from './columnHeaders/GridBaseColumnHeaders';
|
|
8
9
|
import { GridColumnHeadersInner } from './columnHeaders/GridColumnHeadersInner';
|
|
@@ -100,4 +101,5 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaders.propTypes = {
|
|
|
100
101
|
sortColumnLookup: PropTypes.object.isRequired,
|
|
101
102
|
visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
102
103
|
} : void 0;
|
|
103
|
-
|
|
104
|
+
const MemoizedGridColumnHeaders = fastMemo(GridColumnHeaders);
|
|
105
|
+
export { MemoizedGridColumnHeaders as GridColumnHeaders };
|
package/components/GridRow.d.ts
CHANGED
|
@@ -34,5 +34,5 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
34
34
|
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
35
35
|
[x: string]: any;
|
|
36
36
|
}
|
|
37
|
-
declare const
|
|
38
|
-
export { GridRow };
|
|
37
|
+
declare const MemoizedGridRow: React.ForwardRefExoticComponent<Omit<GridRowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
export { MemoizedGridRow as GridRow };
|
package/components/GridRow.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["selected", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"]
|
|
4
|
-
_excluded2 = ["changeReason", "unstable_updateValueOnRender"];
|
|
3
|
+
const _excluded = ["selected", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"];
|
|
5
4
|
import * as React from 'react';
|
|
6
5
|
import PropTypes from 'prop-types';
|
|
7
6
|
import clsx from 'clsx';
|
|
8
7
|
import { unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
8
|
+
import { fastMemo } from '../utils/fastMemo';
|
|
9
9
|
import { GridEditModes, GridRowModes, GridCellModes } from '../models/gridEditRowModel';
|
|
10
10
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
11
11
|
import { getDataGridUtilityClass, gridClasses } from '../constants/gridClasses';
|
|
12
12
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
13
13
|
import { gridColumnsTotalWidthSelector } from '../hooks/features/columns/gridColumnsSelector';
|
|
14
|
-
import { useGridSelector } from '../hooks/utils/useGridSelector';
|
|
14
|
+
import { useGridSelector, objectShallowCompare } from '../hooks/utils/useGridSelector';
|
|
15
15
|
import { useGridVisibleRows } from '../hooks/utils/useGridVisibleRows';
|
|
16
16
|
import { findParentElementFromClassName } from '../utils/domUtils';
|
|
17
17
|
import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../colDef/gridCheckboxSelectionColDef';
|
|
@@ -21,6 +21,7 @@ import { gridSortModelSelector } from '../hooks/features/sorting/gridSortingSele
|
|
|
21
21
|
import { gridRowMaximumTreeDepthSelector } from '../hooks/features/rows/gridRowsSelector';
|
|
22
22
|
import { gridColumnGroupsHeaderMaxDepthSelector } from '../hooks/features/columnGrouping/gridColumnGroupsSelector';
|
|
23
23
|
import { randomNumberBetween } from '../utils/utils';
|
|
24
|
+
import { GridCellWrapper, GridCellV7 } from './cell/GridCell';
|
|
24
25
|
import { gridEditRowsStateSelector } from '../hooks/features/editing/gridEditingSelectors';
|
|
25
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
27
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -67,8 +68,6 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
67
68
|
containerWidth,
|
|
68
69
|
firstColumnToRender,
|
|
69
70
|
isLastVisible = false,
|
|
70
|
-
focusedCell,
|
|
71
|
-
tabbableCell,
|
|
72
71
|
onClick,
|
|
73
72
|
onDoubleClick,
|
|
74
73
|
onMouseEnter,
|
|
@@ -183,78 +182,28 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
183
182
|
const {
|
|
184
183
|
slots,
|
|
185
184
|
slotProps,
|
|
186
|
-
|
|
187
|
-
disableColumnReorder,
|
|
188
|
-
getCellClassName
|
|
185
|
+
disableColumnReorder
|
|
189
186
|
} = rootProps;
|
|
187
|
+
const CellComponent = slots.cell === GridCellV7 ? GridCellV7 : GridCellWrapper;
|
|
190
188
|
const rowReordering = rootProps.rowReordering;
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
const cellParams = apiRef.current.getCellParams(rowId, column.field);
|
|
194
|
-
const classNames = apiRef.current.unstable_applyPipeProcessors('cellClassName', [], {
|
|
195
|
-
id: rowId,
|
|
196
|
-
field: column.field
|
|
197
|
-
});
|
|
189
|
+
const getCell = (column, cellProps) => {
|
|
190
|
+
var _editRowsState$rowId$, _editRowsState$rowId;
|
|
198
191
|
const disableDragEvents = disableColumnReorder && column.disableReorder || !rowReordering && !!sortModel.length && treeDepth > 1 && Object.keys(editRowsState).length > 0;
|
|
199
|
-
|
|
200
|
-
classNames.push(clsx(typeof column.cellClassName === 'function' ? column.cellClassName(cellParams) : column.cellClassName));
|
|
201
|
-
}
|
|
202
|
-
const editCellState = editRowsState[rowId] ? editRowsState[rowId][column.field] : null;
|
|
203
|
-
let content;
|
|
204
|
-
if (editCellState == null && column.renderCell) {
|
|
205
|
-
content = column.renderCell(_extends({}, cellParams, {
|
|
206
|
-
api: apiRef.current
|
|
207
|
-
}));
|
|
208
|
-
// TODO move to GridCell
|
|
209
|
-
classNames.push(clsx(gridClasses['cell--withRenderer'], rootClasses == null ? void 0 : rootClasses['cell--withRenderer']));
|
|
210
|
-
}
|
|
211
|
-
if (editCellState != null && column.renderEditCell) {
|
|
212
|
-
const updatedRow = apiRef.current.getRowWithUpdatedValues(rowId, column.field);
|
|
213
|
-
|
|
214
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
215
|
-
const editCellStateRest = _objectWithoutPropertiesLoose(editCellState, _excluded2);
|
|
216
|
-
const params = _extends({}, cellParams, {
|
|
217
|
-
row: updatedRow
|
|
218
|
-
}, editCellStateRest, {
|
|
219
|
-
api: apiRef.current
|
|
220
|
-
});
|
|
221
|
-
content = column.renderEditCell(params);
|
|
222
|
-
// TODO move to GridCell
|
|
223
|
-
classNames.push(clsx(gridClasses['cell--editing'], rootClasses == null ? void 0 : rootClasses['cell--editing']));
|
|
224
|
-
}
|
|
225
|
-
if (getCellClassName) {
|
|
226
|
-
// TODO move to GridCell
|
|
227
|
-
classNames.push(getCellClassName(cellParams));
|
|
228
|
-
}
|
|
229
|
-
const hasFocus = focusedCell === column.field;
|
|
230
|
-
const tabIndex = tabbableCell === column.field ? 0 : -1;
|
|
231
|
-
const isSelected = apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
|
|
232
|
-
id: rowId,
|
|
233
|
-
field: column.field
|
|
234
|
-
});
|
|
192
|
+
const editCellState = (_editRowsState$rowId$ = (_editRowsState$rowId = editRowsState[rowId]) == null ? void 0 : _editRowsState$rowId[column.field]) != null ? _editRowsState$rowId$ : null;
|
|
235
193
|
return /*#__PURE__*/_jsx(CellComponent, _extends({
|
|
236
|
-
|
|
237
|
-
field: column.field,
|
|
194
|
+
column: column,
|
|
238
195
|
width: cellProps.width,
|
|
239
196
|
rowId: rowId,
|
|
240
197
|
height: rowHeight,
|
|
241
198
|
showRightBorder: cellProps.showRightBorder,
|
|
242
|
-
formattedValue: cellParams.formattedValue,
|
|
243
199
|
align: column.align || 'left',
|
|
244
|
-
cellMode: cellParams.cellMode,
|
|
245
200
|
colIndex: cellProps.indexRelativeToAllColumns,
|
|
246
|
-
isEditable: cellParams.isEditable,
|
|
247
|
-
isSelected: isSelected,
|
|
248
|
-
hasFocus: hasFocus,
|
|
249
|
-
tabIndex: tabIndex,
|
|
250
|
-
className: clsx(classNames),
|
|
251
201
|
colSpan: cellProps.colSpan,
|
|
252
|
-
disableDragEvents: disableDragEvents
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
const sizes = apiRef.current.unstable_getRowInternalSizes(rowId);
|
|
202
|
+
disableDragEvents: disableDragEvents,
|
|
203
|
+
editCellState: editCellState
|
|
204
|
+
}, slotProps == null ? void 0 : slotProps.cell), column.field);
|
|
205
|
+
};
|
|
206
|
+
const sizes = useGridSelector(apiRef, () => _extends({}, apiRef.current.unstable_getRowInternalSizes(rowId)), objectShallowCompare);
|
|
258
207
|
let minHeight = rowHeight;
|
|
259
208
|
if (minHeight === 'auto' && sizes) {
|
|
260
209
|
let numberOfBaseSizes = 0;
|
|
@@ -304,7 +253,11 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
304
253
|
rowClassNames.push(rootProps.getRowClassName(rowParams));
|
|
305
254
|
}
|
|
306
255
|
const randomNumber = randomNumberBetween(10000, 20, 80);
|
|
307
|
-
const
|
|
256
|
+
const rowNode = apiRef.current.getRowNode(rowId);
|
|
257
|
+
if (!rowNode) {
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
const rowType = rowNode.type;
|
|
308
261
|
const cells = [];
|
|
309
262
|
for (let i = 0; i < renderedColumns.length; i += 1) {
|
|
310
263
|
const column = renderedColumns[i];
|
|
@@ -328,7 +281,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
328
281
|
width
|
|
329
282
|
} = cellColSpanInfo.cellProps;
|
|
330
283
|
const contentWidth = Math.round(randomNumber());
|
|
331
|
-
cells.push( /*#__PURE__*/_jsx(
|
|
284
|
+
cells.push( /*#__PURE__*/_jsx(slots.skeletonCell, {
|
|
332
285
|
width: width,
|
|
333
286
|
contentWidth: contentWidth,
|
|
334
287
|
field: column.field,
|
|
@@ -395,4 +348,5 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
395
348
|
tabbableCell: PropTypes.string,
|
|
396
349
|
visibleColumns: PropTypes.arrayOf(PropTypes.object)
|
|
397
350
|
} : void 0;
|
|
398
|
-
|
|
351
|
+
const MemoizedGridRow = fastMemo(GridRow);
|
|
352
|
+
export { MemoizedGridRow as GridRow };
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { GridAlignment } from '../../models/colDef/gridColDef';
|
|
4
|
-
|
|
2
|
+
import { GridRowId, GridCellMode } from '../../models';
|
|
3
|
+
import { GridColDef, GridAlignment } from '../../models/colDef/gridColDef';
|
|
4
|
+
import { GridEditCellProps } from '../../models/gridEditRowModel';
|
|
5
|
+
type GridCellV7Props = {
|
|
5
6
|
align: GridAlignment;
|
|
6
7
|
className?: string;
|
|
7
8
|
colIndex: number;
|
|
8
|
-
|
|
9
|
+
column: GridColDef;
|
|
9
10
|
rowId: GridRowId;
|
|
10
|
-
formattedValue?: F;
|
|
11
|
-
hasFocus?: boolean;
|
|
12
11
|
height: number | 'auto';
|
|
13
|
-
isEditable?: boolean;
|
|
14
|
-
isSelected?: boolean;
|
|
15
12
|
showRightBorder?: boolean;
|
|
16
|
-
value?: V;
|
|
17
13
|
width: number;
|
|
18
|
-
cellMode?: GridCellMode;
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
tabIndex: 0 | -1;
|
|
21
14
|
colSpan?: number;
|
|
22
15
|
disableDragEvents?: boolean;
|
|
16
|
+
editCellState: GridEditCellProps<any> | null;
|
|
23
17
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
24
18
|
onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
25
19
|
onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
|
|
@@ -28,6 +22,21 @@ export interface GridCellProps<V = any, F = V> {
|
|
|
28
22
|
onDragEnter?: React.DragEventHandler<HTMLDivElement>;
|
|
29
23
|
onDragOver?: React.DragEventHandler<HTMLDivElement>;
|
|
30
24
|
[x: string]: any;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export
|
|
25
|
+
};
|
|
26
|
+
type GridCellWrapperProps = GridCellV7Props;
|
|
27
|
+
export type GridCellProps<V = any, F = V> = GridCellWrapperProps & {
|
|
28
|
+
field: string;
|
|
29
|
+
formattedValue?: F;
|
|
30
|
+
hasFocus?: boolean;
|
|
31
|
+
isEditable?: boolean;
|
|
32
|
+
isSelected?: boolean;
|
|
33
|
+
value?: V;
|
|
34
|
+
cellMode?: GridCellMode;
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
tabIndex: 0 | -1;
|
|
37
|
+
};
|
|
38
|
+
declare const GridCell: React.ForwardRefExoticComponent<Omit<GridCellProps<any, any>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
declare const MemoizedCellWrapper: React.ForwardRefExoticComponent<Omit<GridCellV7Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
export { MemoizedCellWrapper as GridCellWrapper, GridCell };
|
|
41
|
+
declare const MemoizedGridCellV7: React.ForwardRefExoticComponent<Omit<GridCellV7Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export { MemoizedGridCellV7 as GridCellV7 };
|