@mui/x-data-grid 5.12.0 → 5.12.3
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 +160 -7
- package/colDef/gridCheckboxSelectionColDef.d.ts +1 -0
- package/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/colDef/gridDateOperators.d.ts +1 -1
- package/colDef/gridNumericColDef.js +1 -1
- package/components/cell/GridBooleanCell.js +4 -3
- package/components/cell/GridEditBooleanCell.js +4 -3
- package/components/cell/GridEditDateCell.js +4 -3
- package/components/cell/GridEditInputCell.js +4 -3
- package/components/cell/GridEditSingleSelectCell.js +9 -7
- package/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/components/containers/GridRootStyles.js +4 -1
- package/components/panel/GridColumnsPanel.js +3 -6
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
- package/components/panel/filterPanel/GridFilterPanel.js +2 -5
- package/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/components/toolbar/GridToolbarQuickFilter.d.ts +7 -0
- package/components/toolbar/GridToolbarQuickFilter.js +57 -4
- package/constants/defaultGridSlotsComponents.js +2 -1
- package/constants/localeTextConstants.js +1 -0
- package/hooks/core/useGridStateInitialization.js +19 -6
- package/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
- package/hooks/features/columns/useGridColumnSpanning.d.ts +1 -1
- package/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +1 -1
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
- package/hooks/features/dimensions/useGridDimensions.js +9 -8
- package/hooks/features/editRows/useGridEditing.old.js +1 -1
- package/hooks/features/filter/gridFilterSelector.d.ts +5 -0
- package/hooks/features/filter/gridFilterSelector.js +6 -0
- package/hooks/features/filter/gridFilterState.d.ts +1 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +1 -1
- package/hooks/features/filter/gridFilterUtils.js +10 -9
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +24 -7
- package/hooks/features/pagination/useGridPage.js +1 -1
- package/hooks/features/pagination/useGridPageSize.js +1 -1
- package/hooks/features/rows/useGridRows.js +15 -2
- package/hooks/features/rows/useGridRowsMeta.js +79 -77
- package/hooks/features/selection/useGridSelection.js +1 -1
- package/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/index.js +1 -1
- package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/legacy/colDef/gridNumericColDef.js +1 -1
- package/legacy/components/cell/GridBooleanCell.js +3 -1
- package/legacy/components/cell/GridEditBooleanCell.js +4 -2
- package/legacy/components/cell/GridEditDateCell.js +4 -2
- package/legacy/components/cell/GridEditInputCell.js +4 -2
- package/legacy/components/cell/GridEditSingleSelectCell.js +9 -7
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/legacy/components/containers/GridRootStyles.js +7 -5
- package/legacy/components/panel/GridColumnsPanel.js +5 -6
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +3 -6
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/legacy/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/legacy/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +67 -6
- package/legacy/constants/defaultGridSlotsComponents.js +2 -1
- package/legacy/constants/localeTextConstants.js +1 -0
- package/legacy/hooks/core/useGridStateInitialization.js +18 -6
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/legacy/hooks/features/columns/useGridColumns.js +1 -1
- package/legacy/hooks/features/dimensions/useGridDimensions.js +9 -8
- package/legacy/hooks/features/editRows/useGridEditing.old.js +1 -1
- package/legacy/hooks/features/filter/gridFilterSelector.js +8 -0
- package/legacy/hooks/features/filter/gridFilterUtils.js +11 -10
- package/legacy/hooks/features/filter/useGridFilter.js +28 -7
- package/legacy/hooks/features/pagination/useGridPage.js +1 -1
- package/legacy/hooks/features/pagination/useGridPageSize.js +1 -1
- package/legacy/hooks/features/rows/useGridRows.js +17 -2
- package/legacy/hooks/features/rows/useGridRowsMeta.js +81 -77
- package/legacy/hooks/features/selection/useGridSelection.js +1 -1
- package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/legacy/hooks/features/sorting/useGridSorting.js +1 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/legacy/index.js +1 -1
- package/legacy/locales/arSD.js +1 -0
- package/legacy/locales/bgBG.js +1 -0
- package/legacy/locales/csCZ.js +1 -0
- package/legacy/locales/daDK.js +1 -0
- package/legacy/locales/deDE.js +1 -0
- package/legacy/locales/elGR.js +1 -0
- package/legacy/locales/esES.js +1 -0
- package/legacy/locales/faIR.js +1 -0
- package/legacy/locales/fiFI.js +1 -0
- package/legacy/locales/frFR.js +1 -0
- package/legacy/locales/heIL.js +1 -0
- package/legacy/locales/huHU.js +1 -0
- package/legacy/locales/index.js +1 -0
- package/legacy/locales/itIT.js +1 -0
- package/legacy/locales/jaJP.js +29 -24
- package/legacy/locales/koKR.js +1 -0
- package/legacy/locales/nbNO.js +1 -0
- package/legacy/locales/nlNL.js +1 -0
- package/legacy/locales/plPL.js +1 -0
- package/legacy/locales/ptBR.js +1 -0
- package/legacy/locales/ruRU.js +7 -6
- package/legacy/locales/skSK.js +1 -0
- package/legacy/locales/svSE.js +128 -0
- package/legacy/locales/trTR.js +1 -0
- package/legacy/locales/ukUA.js +1 -0
- package/legacy/locales/viVN.js +1 -0
- package/legacy/locales/zhCN.js +1 -0
- package/locales/arSD.js +1 -0
- package/locales/bgBG.js +1 -0
- package/locales/csCZ.js +1 -0
- package/locales/daDK.js +1 -0
- package/locales/deDE.js +1 -0
- package/locales/elGR.js +1 -0
- package/locales/esES.js +1 -0
- package/locales/faIR.js +1 -0
- package/locales/fiFI.js +1 -0
- package/locales/frFR.js +1 -0
- package/locales/heIL.js +1 -0
- package/locales/huHU.js +1 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/locales/itIT.js +1 -0
- package/locales/jaJP.js +25 -24
- package/locales/koKR.js +1 -0
- package/locales/nbNO.js +1 -0
- package/locales/nlNL.js +1 -0
- package/locales/plPL.js +1 -0
- package/locales/ptBR.js +1 -0
- package/locales/ruRU.js +7 -6
- package/locales/skSK.js +1 -0
- package/locales/svSE.d.ts +2 -0
- package/locales/svSE.js +116 -0
- package/locales/trTR.js +1 -0
- package/locales/ukUA.js +1 -0
- package/locales/viVN.js +1 -0
- package/locales/zhCN.js +1 -0
- package/models/api/gridCallbackDetails.d.ts +6 -1
- package/models/api/gridFilterApi.d.ts +8 -1
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/api/gridStateApi.d.ts +14 -3
- package/models/colDef/gridColDef.d.ts +1 -1
- package/models/events/gridEventLookup.d.ts +3 -0
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/modern/colDef/gridNumericColDef.js +1 -1
- package/modern/components/cell/GridBooleanCell.js +4 -3
- package/modern/components/cell/GridEditBooleanCell.js +4 -3
- package/modern/components/cell/GridEditDateCell.js +4 -3
- package/modern/components/cell/GridEditInputCell.js +4 -3
- package/modern/components/cell/GridEditSingleSelectCell.js +9 -7
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/modern/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/modern/components/containers/GridRootStyles.js +4 -1
- package/modern/components/panel/GridColumnsPanel.js +3 -6
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
- package/modern/components/panel/filterPanel/GridFilterPanel.js +2 -5
- package/modern/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/modern/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/modern/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +57 -4
- package/modern/constants/defaultGridSlotsComponents.js +2 -1
- package/modern/constants/localeTextConstants.js +1 -0
- package/modern/hooks/core/useGridStateInitialization.js +19 -6
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
- package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/modern/hooks/features/columns/useGridColumns.js +1 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +9 -8
- package/modern/hooks/features/editRows/useGridEditing.old.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +6 -0
- package/modern/hooks/features/filter/gridFilterUtils.js +10 -9
- package/modern/hooks/features/filter/useGridFilter.js +24 -7
- package/modern/hooks/features/pagination/useGridPage.js +1 -1
- package/modern/hooks/features/pagination/useGridPageSize.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +15 -2
- package/modern/hooks/features/rows/useGridRowsMeta.js +77 -75
- package/modern/hooks/features/selection/useGridSelection.js +1 -1
- package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/modern/index.js +1 -1
- package/modern/locales/arSD.js +1 -0
- package/modern/locales/bgBG.js +1 -0
- package/modern/locales/csCZ.js +1 -0
- package/modern/locales/daDK.js +1 -0
- package/modern/locales/deDE.js +1 -0
- package/modern/locales/elGR.js +1 -0
- package/modern/locales/esES.js +1 -0
- package/modern/locales/faIR.js +1 -0
- package/modern/locales/fiFI.js +1 -0
- package/modern/locales/frFR.js +1 -0
- package/modern/locales/heIL.js +1 -0
- package/modern/locales/huHU.js +1 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/itIT.js +1 -0
- package/modern/locales/jaJP.js +25 -24
- package/modern/locales/koKR.js +1 -0
- package/modern/locales/nbNO.js +1 -0
- package/modern/locales/nlNL.js +1 -0
- package/modern/locales/plPL.js +1 -0
- package/modern/locales/ptBR.js +1 -0
- package/modern/locales/ruRU.js +7 -6
- package/modern/locales/skSK.js +1 -0
- package/modern/locales/svSE.js +116 -0
- package/modern/locales/trTR.js +1 -0
- package/modern/locales/ukUA.js +1 -0
- package/modern/locales/viVN.js +1 -0
- package/modern/locales/zhCN.js +1 -0
- package/node/colDef/gridCheckboxSelectionColDef.js +4 -2
- package/node/colDef/gridNumericColDef.js +1 -1
- package/node/components/cell/GridBooleanCell.js +5 -3
- package/node/components/cell/GridEditBooleanCell.js +5 -3
- package/node/components/cell/GridEditDateCell.js +5 -3
- package/node/components/cell/GridEditInputCell.js +5 -3
- package/node/components/cell/GridEditSingleSelectCell.js +10 -7
- package/node/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/node/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/node/components/containers/GridRootStyles.js +4 -1
- package/node/components/panel/GridColumnsPanel.js +3 -6
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
- package/node/components/panel/filterPanel/GridFilterPanel.js +2 -5
- package/node/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/node/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/node/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +61 -4
- package/node/constants/defaultGridSlotsComponents.js +2 -1
- package/node/constants/localeTextConstants.js +1 -0
- package/node/hooks/core/useGridStateInitialization.js +19 -6
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +23 -0
- package/node/hooks/features/columns/useGridColumnSpanning.js +11 -16
- package/node/hooks/features/columns/useGridColumns.js +1 -1
- package/node/hooks/features/dimensions/useGridDimensions.js +9 -8
- package/node/hooks/features/editRows/useGridEditing.old.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +9 -2
- package/node/hooks/features/filter/gridFilterUtils.js +9 -8
- package/node/hooks/features/filter/useGridFilter.js +24 -7
- package/node/hooks/features/pagination/useGridPage.js +1 -1
- package/node/hooks/features/pagination/useGridPageSize.js +1 -1
- package/node/hooks/features/rows/useGridRows.js +15 -2
- package/node/hooks/features/rows/useGridRowsMeta.js +80 -77
- package/node/hooks/features/selection/useGridSelection.js +1 -1
- package/node/hooks/features/selection/useGridSelectionPreProcessors.js +7 -5
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +42 -9
- package/node/index.js +1 -1
- package/node/locales/arSD.js +1 -0
- package/node/locales/bgBG.js +1 -0
- package/node/locales/csCZ.js +1 -0
- package/node/locales/daDK.js +1 -0
- package/node/locales/deDE.js +1 -0
- package/node/locales/elGR.js +1 -0
- package/node/locales/esES.js +1 -0
- package/node/locales/faIR.js +1 -0
- package/node/locales/fiFI.js +1 -0
- package/node/locales/frFR.js +1 -0
- package/node/locales/heIL.js +1 -0
- package/node/locales/huHU.js +1 -0
- package/node/locales/index.js +13 -0
- package/node/locales/itIT.js +1 -0
- package/node/locales/jaJP.js +25 -24
- package/node/locales/koKR.js +1 -0
- package/node/locales/nbNO.js +1 -0
- package/node/locales/nlNL.js +1 -0
- package/node/locales/plPL.js +1 -0
- package/node/locales/ptBR.js +1 -0
- package/node/locales/ruRU.js +7 -6
- package/node/locales/skSK.js +1 -0
- package/node/locales/svSE.js +126 -0
- package/node/locales/trTR.js +1 -0
- package/node/locales/ukUA.js +1 -0
- package/node/locales/viVN.js +1 -0
- package/node/locales/zhCN.js +1 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,157 @@
|
|
|
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
|
+
## v5.12.3
|
|
7
|
+
|
|
8
|
+
_Jun 23, 2022_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Add Swedish (sv-SE) locale on the data grid and the pickers (#5210) @mrxdst
|
|
13
|
+
- 🌍 Add Dutch (nl-NL) locale on the pickers (#5237) @DDukers
|
|
14
|
+
- 📚 Documentation improvements
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
### `@mui/x-data-grid@v5.12.3` / `@mui/x-data-grid-pro@v5.12.3` / `@mui/x-data-grid-premium@v5.12.3`
|
|
18
|
+
|
|
19
|
+
#### Changes
|
|
20
|
+
|
|
21
|
+
- [DataGrid] Do not hide non-hideable column when pressing Hide All button (#5298) @flaviendelangle
|
|
22
|
+
- [DataGrid] Do not regenerate the row tree when the `loading` prop changes (#5213) @flaviendelangle
|
|
23
|
+
- [DataGrid] Fix the default filter operator fallback on state initialization (#5266) @flaviendelangle
|
|
24
|
+
- [DataGrid] Stop using the deprecated `api` prop in the grid components (#5205) @flaviendelangle
|
|
25
|
+
- [DataGrid] Add Swedish (sv-SE) locale (#5210) @mrxdst
|
|
26
|
+
- [DataGridPremium] Fix detail panel on `DataGridPremium` (#5264) @flaviendelangle
|
|
27
|
+
- [DataGridPremium] Fix Excel import with Remix / Vite (#5207) @alexfauquette
|
|
28
|
+
- [DataGridPremium] Fix error with quick filter and grouping rows (#5238) @alexfauquette
|
|
29
|
+
|
|
30
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.7` / `@mui/x-date-pickers-pro@v5.0.0-alpha.7`
|
|
31
|
+
|
|
32
|
+
#### Changes
|
|
33
|
+
|
|
34
|
+
- [pickers] Export adapters from both `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` (#5204) @flaviendelangle
|
|
35
|
+
- [pickers] Add Dutch (nl-NL) locale (#5237) @DDukers
|
|
36
|
+
|
|
37
|
+
### Docs
|
|
38
|
+
|
|
39
|
+
- [docs] Add `DataGridPremium` to all API sections (#5196) @flaviendelangle
|
|
40
|
+
- [docs] Add plan badge next to event name in the Events page (#5200) @flaviendelangle
|
|
41
|
+
- [docs] Add section for theme augmentation in the picker docs (#5276) @flaviendelangle
|
|
42
|
+
- [docs] Add waiting for upvote section for row group panel (#5271) @flaviendelangle
|
|
43
|
+
- [docs] Disable ad on main demo page (#5301) @joserodolfofreitas
|
|
44
|
+
- [docs] Fix typo in the `DateRangePicker` documentation (#5259) @flaviendelangle
|
|
45
|
+
|
|
46
|
+
### Core
|
|
47
|
+
|
|
48
|
+
- [core] Allow having multiple playgrounds (#5288) @alexfauquette
|
|
49
|
+
- [core] Improve typing of `GridFilterInputMultipleSingleSelect` (#5206) @flaviendelangle
|
|
50
|
+
- [core] Remove arbitrary new lines (#5245) @oliviertassinari
|
|
51
|
+
- [core] Remove dead logic (#5282) @oliviertassinari
|
|
52
|
+
- [test] Fix `inputFormat` when testing with different date adapters (#5291) @cherniavskii
|
|
53
|
+
- [test] Fix date assertion in Safari 13 (#5221) @m4theushw
|
|
54
|
+
- [test] Throw if date adapter is not found (#5289) @cherniavskii
|
|
55
|
+
- [test] Use mock for `ResizeObserver` (#5215) @m4theushw
|
|
56
|
+
|
|
57
|
+
## v5.12.2
|
|
58
|
+
|
|
59
|
+
_Jun 16, 2022_
|
|
60
|
+
|
|
61
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
62
|
+
|
|
63
|
+
- 🚀 Performance improvement for dynamic row height (#5135) @m4theushw
|
|
64
|
+
- 🕒 Add demo of how to use the data grid with date pickers (#5053) @cherniavskii
|
|
65
|
+
- 📚 Documentation improvements
|
|
66
|
+
- 🐞 Bugfixes
|
|
67
|
+
|
|
68
|
+
### `@mui/x-data-grid@v5.12.2` / `@mui/x-data-grid-pro@v5.12.2` / `@mui/x-data-grid-premium@v5.12.2`
|
|
69
|
+
|
|
70
|
+
#### Changes
|
|
71
|
+
|
|
72
|
+
- [DataGrid] Fix for cosmetic bug on column filter badge (#5170) @simbahandiane
|
|
73
|
+
- [DataGrid] Hide vertical scrollbar if `autoHeight` is enabled (#5164) @m4theushw
|
|
74
|
+
- [DataGrid] Use exponential search to render non-measured rows (#5135) @m4theushw
|
|
75
|
+
- [DataGridPro] Fix label of the detail panel toggle column (#5191) @m4theushw
|
|
76
|
+
- [DataGridPro] Refresh detail panel caches when props change (#5110) @m4theushw
|
|
77
|
+
|
|
78
|
+
### Docs
|
|
79
|
+
|
|
80
|
+
- [docs] Add example with custom checkbox column (#5161) @flaviendelangle
|
|
81
|
+
- [docs] Batch small changes (#5177) @oliviertassinari
|
|
82
|
+
- [docs] Fix demo currency format (#5034) @oliviertassinari
|
|
83
|
+
- [docs] Fix outdated license description to match the EULA (#5219) @joserodolfofreitas
|
|
84
|
+
- [docs] Fix redundant headers (#5104) @oliviertassinari
|
|
85
|
+
- [docs] Fix some capitalization to match the guidelines (#5105) @oliviertassinari
|
|
86
|
+
- [docs] Improve the `getRowId` doc section (#5156) @flaviendelangle
|
|
87
|
+
- [docs] Instruction to deal with invalid license message (#5074) @joserodolfofreitas
|
|
88
|
+
- [docs] Use redirection in the code (#5114) @oliviertassinari
|
|
89
|
+
- [docs] Add demo of how to use the data grid with date pickers (#5053) @cherniavskii
|
|
90
|
+
|
|
91
|
+
### Core
|
|
92
|
+
|
|
93
|
+
- [core] Improve inline code rendering within the details tag (#5166) @Harmouch101
|
|
94
|
+
- [core] Remove unused props from plugin typing (#5185) @flaviendelangle
|
|
95
|
+
- [core] Use the scrollbar size from `useGridDimensions` on `DataGridProColumnHeaders` (#5201) @flaviendelangle
|
|
96
|
+
- [core] Fix `GridColTypeDef` type (#5167) @cherniavskii
|
|
97
|
+
- [core] Fix `GridColTypeDef` usage in demo (#5197) @cherniavskii
|
|
98
|
+
- [test] Add `waitFor` before asserting height (#5203) @m4theushw
|
|
99
|
+
|
|
100
|
+
## v5.12.1
|
|
101
|
+
|
|
102
|
+
_Jun 9, 2022_
|
|
103
|
+
|
|
104
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
105
|
+
|
|
106
|
+
- 🎁 Add `reason` to `onFilterModelChange` (#4938) @m4theushw
|
|
107
|
+
- 🔎 Control quick filter input value via model prop (#5013) @alexfauquette
|
|
108
|
+
- 📚 Documentation improvements
|
|
109
|
+
- 🐞 Bugfixes
|
|
110
|
+
|
|
111
|
+
### `@mui/x-data-grid@v5.12.1` / `@mui/x-data-grid-pro@v5.12.1` / `@mui/x-data-grid-premium@v5.12.1`
|
|
112
|
+
|
|
113
|
+
#### Changes
|
|
114
|
+
|
|
115
|
+
- [DataGrid] Add `reason` to `onFilterModelChange` (#4938) @m4theushw
|
|
116
|
+
- [DataGrid] Restore focus after dismissing the column menu (#5027) @m4theushw
|
|
117
|
+
- [DataGrid] Update quick filter input when model is modified (#5013) @alexfauquette
|
|
118
|
+
- [DataGrid] Fix implicit dependency on react-dom (#5121) @oliviertassinari
|
|
119
|
+
- [DataGrid] Support `getRowId` in row reordering (#5093) @flaviendelangle
|
|
120
|
+
- [DataGridPro] Fix column resizing in RTL mode (#4989) @cherniavskii
|
|
121
|
+
- [DataGridPro] Fix column resizing on touchscreen (#5056) @cherniavskii
|
|
122
|
+
- [l10n] Update Japanese (ja-JP) locale (#5122) @hikotq
|
|
123
|
+
- [l10n] Update Russian (ru-RU) locale (#5069) @Artboomy
|
|
124
|
+
|
|
125
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.6` / `@mui/x-date-pickers-pro@v5.0.0-alpha.6`
|
|
126
|
+
|
|
127
|
+
#### Changes
|
|
128
|
+
|
|
129
|
+
- [pickers] Fix usage of `maxDate` / `minDate` / `disableFuture` and `disablePast` (#5081) @flaviendelangle
|
|
130
|
+
- [pickers] Infer mask from `inputFormat` (#5060) @alexfauquette
|
|
131
|
+
- [pickers] Manage input value without using the focus (#4486) @alexfauquette
|
|
132
|
+
- [pickers] Use new localization for doc examples (#5097) @flaviendelangle
|
|
133
|
+
- [pickers] Fix `shouldDisableDate` in range pickers (#5123) @flaviendelangle
|
|
134
|
+
- [l10n] Add Brazilian Portuguese (pt-BR) locale (#5100) @jardelnovaes
|
|
135
|
+
- [l10n] Use `localText` for remaining texts (#4986) @alexfauquette
|
|
136
|
+
|
|
137
|
+
### Docs
|
|
138
|
+
|
|
139
|
+
- [docs] Implement the focus management on data grid demo links (#5070) @alexfauquette
|
|
140
|
+
- [docs] Fix `301` link to render cell (#5106) @oliviertassinari
|
|
141
|
+
- [docs] Fix broken anchor link @oliviertassinari
|
|
142
|
+
- [docs] Improve movie dataset (#5142) @flaviendelangle
|
|
143
|
+
- [docs] Move all localization documentation in a unique page (#5072) @alexfauquette
|
|
144
|
+
- [docs] Section for overwriting core components i18n keys (#4998) @DanailH
|
|
145
|
+
- [docs] Small grammar and format fixes for Dynamic Row Height section (#5098) @samuelsycamore
|
|
146
|
+
|
|
147
|
+
### Core
|
|
148
|
+
|
|
149
|
+
- [core] Allows to run tests with different date adapters (#5055) @alexfauquette
|
|
150
|
+
- [core] Prettify the l10n issue (#4928) @alexfauquette
|
|
151
|
+
- [core] Set correct `apiRef` type in row reorder pre processors #5125 @DanailH
|
|
152
|
+
- [core] Stop using `GridEvents` in technical doc (#5157) @flaviendelangle
|
|
153
|
+
- [core] Upgrade monorepo (#5101) @oliviertassinari
|
|
154
|
+
- [test] Fix dynamic row height test failing on Chrome (#5147) @m4theushw
|
|
155
|
+
- [test] Remove delay on server demo for regression tests (#5131) @alexfauquette
|
|
156
|
+
|
|
6
157
|
## v5.12.0
|
|
7
158
|
|
|
8
159
|
_May 31, 2022_
|
|
@@ -21,6 +172,8 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
21
172
|
|
|
22
173
|
### `@mui/x-data-grid@v5.12.0` / `@mui/x-data-grid-pro@v5.12.0` / `@mui/x-data-grid-premium@v5.12.0`
|
|
23
174
|
|
|
175
|
+
#### Changes
|
|
176
|
+
|
|
24
177
|
- [DataGrid] Support dynamic row height (#4859) @m4theushw
|
|
25
178
|
- [DataGrid] Add `onMenuOpen` and `onMenuClose` props (#4825) @DanailH
|
|
26
179
|
- [DataGrid] Add generics to `GridActionsColDef` to match `GridColDef` (#4982) @subvertallchris
|
|
@@ -36,7 +189,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
36
189
|
- [l10n] Add Norwegian (Bokmål) (nb-NO) locale (#5001) @spiftire
|
|
37
190
|
- [l10n] Add Turkish (tr-TR) locale (#5026) @Rassilion
|
|
38
191
|
|
|
39
|
-
### `@mui/x-date-pickers@
|
|
192
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.5` / `@mui/x-date-pickers-pro@v5.0.0-alpha.5`
|
|
40
193
|
|
|
41
194
|
#### Breaking changes
|
|
42
195
|
|
|
@@ -109,7 +262,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
109
262
|
- [DataGridPremium] Support column spanning in the Excel export (#4830) @cherniavskii
|
|
110
263
|
- [l10n] Improve Russian (ru-RU) locale (#4864) @arvkonstantin
|
|
111
264
|
|
|
112
|
-
### `@mui/x-date-pickers@
|
|
265
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.4` / `@mui/x-date-pickers-pro@v5.0.0-alpha.4`
|
|
113
266
|
|
|
114
267
|
#### Breaking changes
|
|
115
268
|
|
|
@@ -234,7 +387,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
234
387
|
- [l10n] Improve German (de-DE) locale (#4748) @sebastianfrey
|
|
235
388
|
- [l10n] Improve German (de-DE) locale (#4668) @izu-co
|
|
236
389
|
|
|
237
|
-
### `@mui/x-date-pickers@
|
|
390
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.3` / `@mui/x-date-pickers-pro@v5.0.0-alpha.3`
|
|
238
391
|
|
|
239
392
|
#### Breaking changes
|
|
240
393
|
|
|
@@ -335,7 +488,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
335
488
|
- [DataGrid] Don't close column menu when updating rows (#4498) @m4theushw
|
|
336
489
|
- [DataGridPro] Introduce row reorder (#4034) @DanailH
|
|
337
490
|
|
|
338
|
-
### `@mui/x-date-pickers@
|
|
491
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.2` / `@mui/x-date-pickers-pro@v5.0.0-alpha.2`
|
|
339
492
|
|
|
340
493
|
- [pickers] Pass `PaperProps` to `DesktopWrapper` component (#4584) @alexfauquette
|
|
341
494
|
- [TimePicker] Fix bug when time picker clear value (#4582) @alexfauquette
|
|
@@ -396,7 +549,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
|
|
|
396
549
|
- [DataGridPro] Fix toggling detail panel using keyboard (#4409) @cherniavskii
|
|
397
550
|
- [l10n] Add Hungarian (hu-HU) locale (#4458) @x22tri
|
|
398
551
|
|
|
399
|
-
### `@mui/x-date-pickers@
|
|
552
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.1` / `@mui/x-date-pickers-pro@v5.0.0-alpha.1`
|
|
400
553
|
|
|
401
554
|
- [ClockPicker] Should call `shouldDisableTime` with the hours with meridiem (#4404) @flaviendelangle
|
|
402
555
|
- [MonthPicker] Clicking on a `PickersMonth` button should not trigger the form submit (#4402) @flaviendelangle
|
|
@@ -4025,9 +4178,9 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
|
|
|
4025
4178
|
|
|
4026
4179
|
### Docs
|
|
4027
4180
|
|
|
4028
|
-
- [docs] Data
|
|
4181
|
+
- [docs] Data grid depends on side effects (#666) @oliviertassinari
|
|
4029
4182
|
- [docs] Clarify the purpose of x-grid-data-generator (#634) @Elius94
|
|
4030
|
-
- [docs] Data
|
|
4183
|
+
- [docs] Data grid is in the lab (#612) @oliviertassinari
|
|
4031
4184
|
- [docs] Fix Demo app, downgrade webpack-cli, known issue in latest version (#647) @dtassone
|
|
4032
4185
|
- [docs] Fix typo in columns.md @stojy
|
|
4033
4186
|
- [docs] Reduce confusion on /export page (#646) @SerdarMustafa1
|
|
@@ -5,8 +5,9 @@ import { GridHeaderCheckbox } from '../components/columnSelection/GridHeaderChec
|
|
|
5
5
|
import { selectedIdsLookupSelector } from '../hooks/features/selection/gridSelectionSelector';
|
|
6
6
|
import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const GRID_CHECKBOX_SELECTION_FIELD = '__check__';
|
|
8
9
|
export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF, {
|
|
9
|
-
field:
|
|
10
|
+
field: GRID_CHECKBOX_SELECTION_FIELD,
|
|
10
11
|
type: 'checkboxSelection',
|
|
11
12
|
width: 50,
|
|
12
13
|
resizable: false,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GridFilterOperator } from '../models/gridFilterOperator';
|
|
2
|
-
export declare const getGridDateOperators: (showTime?: boolean | undefined) => GridFilterOperator<any, string |
|
|
2
|
+
export declare const getGridDateOperators: (showTime?: boolean | undefined) => GridFilterOperator<any, string | Date, any>[];
|
|
@@ -11,7 +11,7 @@ export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
11
11
|
valueParser: value => value === '' ? null : Number(value),
|
|
12
12
|
valueFormatter: ({
|
|
13
13
|
value
|
|
14
|
-
}) =>
|
|
14
|
+
}) => isNumber(value) ? value.toLocaleString() : value || '',
|
|
15
15
|
filterOperators: getGridNumericOperators(),
|
|
16
16
|
getApplyQuickFilterFn: getGridNumericQuickFilterFn
|
|
17
17
|
});
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
6
6
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
7
7
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
8
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
|
|
10
11
|
const useUtilityClasses = ownerState => {
|
|
@@ -19,11 +20,11 @@ const useUtilityClasses = ownerState => {
|
|
|
19
20
|
|
|
20
21
|
export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
|
|
21
22
|
const {
|
|
22
|
-
value
|
|
23
|
-
api
|
|
23
|
+
value
|
|
24
24
|
} = props,
|
|
25
25
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
26
26
|
|
|
27
|
+
const apiRef = useGridApiContext();
|
|
27
28
|
const rootProps = useGridRootProps();
|
|
28
29
|
const ownerState = {
|
|
29
30
|
classes: rootProps.classes
|
|
@@ -33,7 +34,7 @@ export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
|
|
|
33
34
|
return /*#__PURE__*/_jsx(Icon, _extends({
|
|
34
35
|
fontSize: "small",
|
|
35
36
|
className: classes.root,
|
|
36
|
-
titleAccess:
|
|
37
|
+
titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
|
|
37
38
|
"data-value": Boolean(value)
|
|
38
39
|
}, other));
|
|
39
40
|
});
|
|
@@ -8,6 +8,7 @@ import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
|
8
8
|
import { unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
|
|
13
14
|
const useUtilityClasses = ownerState => {
|
|
@@ -26,7 +27,6 @@ function GridEditBooleanCell(props) {
|
|
|
26
27
|
const {
|
|
27
28
|
id: idProp,
|
|
28
29
|
value,
|
|
29
|
-
api,
|
|
30
30
|
field,
|
|
31
31
|
className,
|
|
32
32
|
hasFocus,
|
|
@@ -34,6 +34,7 @@ function GridEditBooleanCell(props) {
|
|
|
34
34
|
} = props,
|
|
35
35
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
36
36
|
|
|
37
|
+
const apiRef = useGridApiContext();
|
|
37
38
|
const inputRef = React.useRef(null);
|
|
38
39
|
const id = useId();
|
|
39
40
|
const [valueState, setValueState] = React.useState(value);
|
|
@@ -50,12 +51,12 @@ function GridEditBooleanCell(props) {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
setValueState(newValue);
|
|
53
|
-
await
|
|
54
|
+
await apiRef.current.setEditCellValue({
|
|
54
55
|
id: idProp,
|
|
55
56
|
field,
|
|
56
57
|
value: newValue
|
|
57
58
|
}, event);
|
|
58
|
-
}, [
|
|
59
|
+
}, [apiRef, field, idProp, onValueChange]);
|
|
59
60
|
React.useEffect(() => {
|
|
60
61
|
setValueState(value);
|
|
61
62
|
}, [value]);
|
|
@@ -8,6 +8,7 @@ import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/u
|
|
|
8
8
|
import InputBase from '@mui/material/InputBase';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
|
|
13
14
|
const useUtilityClasses = ownerState => {
|
|
@@ -24,7 +25,6 @@ function GridEditDateCell(props) {
|
|
|
24
25
|
const {
|
|
25
26
|
id,
|
|
26
27
|
value: valueProp,
|
|
27
|
-
api,
|
|
28
28
|
field,
|
|
29
29
|
colDef,
|
|
30
30
|
hasFocus,
|
|
@@ -34,6 +34,7 @@ function GridEditDateCell(props) {
|
|
|
34
34
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
35
35
|
|
|
36
36
|
const isDateTime = colDef.type === 'dateTime';
|
|
37
|
+
const apiRef = useGridApiContext();
|
|
37
38
|
const inputRef = React.useRef();
|
|
38
39
|
const valueTransformed = React.useMemo(() => {
|
|
39
40
|
let parsedDate;
|
|
@@ -93,12 +94,12 @@ function GridEditDateCell(props) {
|
|
|
93
94
|
parsed: newParsedDate,
|
|
94
95
|
formatted: newFormattedDate
|
|
95
96
|
});
|
|
96
|
-
|
|
97
|
+
apiRef.current.setEditCellValue({
|
|
97
98
|
id,
|
|
98
99
|
field,
|
|
99
100
|
value: newParsedDate
|
|
100
101
|
}, event);
|
|
101
|
-
}, [
|
|
102
|
+
}, [apiRef, field, id, onValueChange]);
|
|
102
103
|
React.useEffect(() => {
|
|
103
104
|
setValueState(state => {
|
|
104
105
|
var _valueTransformed$par, _state$parsed;
|
|
@@ -11,6 +11,7 @@ import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
|
11
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
12
12
|
import { GridLoadIcon } from '../icons/index';
|
|
13
13
|
import { SUBMIT_FILTER_STROKE_TIME } from '../panel/filterPanel/GridFilterInputValue';
|
|
14
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
|
|
16
17
|
const useUtilityClasses = ownerState => {
|
|
@@ -45,7 +46,6 @@ function GridEditInputCell(props) {
|
|
|
45
46
|
const {
|
|
46
47
|
id,
|
|
47
48
|
value,
|
|
48
|
-
api,
|
|
49
49
|
field,
|
|
50
50
|
colDef,
|
|
51
51
|
hasFocus,
|
|
@@ -55,6 +55,7 @@ function GridEditInputCell(props) {
|
|
|
55
55
|
} = props,
|
|
56
56
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
57
57
|
|
|
58
|
+
const apiRef = useGridApiContext();
|
|
58
59
|
const inputRef = React.useRef();
|
|
59
60
|
const [valueState, setValueState] = React.useState(value);
|
|
60
61
|
const ownerState = {
|
|
@@ -69,13 +70,13 @@ function GridEditInputCell(props) {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
setValueState(newValue);
|
|
72
|
-
|
|
73
|
+
apiRef.current.setEditCellValue({
|
|
73
74
|
id,
|
|
74
75
|
field,
|
|
75
76
|
value: newValue,
|
|
76
77
|
debounceMs
|
|
77
78
|
}, event);
|
|
78
|
-
}, [
|
|
79
|
+
}, [apiRef, debounceMs, field, id, onValueChange]);
|
|
79
80
|
React.useEffect(() => {
|
|
80
81
|
setValueState(value);
|
|
81
82
|
}, [value]);
|
|
@@ -9,6 +9,7 @@ import { isEscapeKey } from '../../utils/keyboardUtils';
|
|
|
9
9
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
10
10
|
import { GridEditModes } from '../../models/gridEditRowModel';
|
|
11
11
|
import { getValueFromValueOptions } from '../panel/filterPanel/filterPanelUtils';
|
|
12
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
|
|
14
15
|
const renderSingleSelectOptions = (option, OptionComponent) => {
|
|
@@ -38,6 +39,7 @@ function GridEditSingleSelectCell(props) {
|
|
|
38
39
|
} = props,
|
|
39
40
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
40
41
|
|
|
42
|
+
const apiRef = useGridApiContext();
|
|
41
43
|
const ref = React.useRef();
|
|
42
44
|
const inputRef = React.useRef();
|
|
43
45
|
const rootProps = useGridRootProps();
|
|
@@ -86,7 +88,7 @@ function GridEditSingleSelectCell(props) {
|
|
|
86
88
|
await onValueChange(event, formattedTargetValue);
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
const isValid = await
|
|
91
|
+
const isValid = await apiRef.current.setEditCellValue({
|
|
90
92
|
id,
|
|
91
93
|
field,
|
|
92
94
|
value: formattedTargetValue
|
|
@@ -101,18 +103,18 @@ function GridEditSingleSelectCell(props) {
|
|
|
101
103
|
return;
|
|
102
104
|
}
|
|
103
105
|
|
|
104
|
-
const canCommit = await Promise.resolve(
|
|
106
|
+
const canCommit = await Promise.resolve(apiRef.current.commitCellChange({
|
|
105
107
|
id,
|
|
106
108
|
field
|
|
107
109
|
}, event));
|
|
108
110
|
|
|
109
111
|
if (canCommit) {
|
|
110
|
-
|
|
112
|
+
apiRef.current.setCellMode(id, field, 'view');
|
|
111
113
|
|
|
112
114
|
if (event.key) {
|
|
113
115
|
// TODO v6: remove once we stop ignoring events fired from portals
|
|
114
|
-
const params =
|
|
115
|
-
|
|
116
|
+
const params = apiRef.current.getCellParams(id, field);
|
|
117
|
+
apiRef.current.publishEvent('cellNavigationKeyDown', params, event);
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
};
|
|
@@ -127,13 +129,13 @@ function GridEditSingleSelectCell(props) {
|
|
|
127
129
|
var _rootProps$experiment2;
|
|
128
130
|
|
|
129
131
|
if ((_rootProps$experiment2 = rootProps.experimentalFeatures) != null && _rootProps$experiment2.newEditingApi) {
|
|
130
|
-
|
|
132
|
+
apiRef.current.stopCellEditMode({
|
|
131
133
|
id,
|
|
132
134
|
field,
|
|
133
135
|
ignoreModifications: true
|
|
134
136
|
});
|
|
135
137
|
} else {
|
|
136
|
-
|
|
138
|
+
apiRef.current.setCellMode(id, field, 'view');
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
};
|
|
@@ -167,6 +167,7 @@ function GridColumnHeaderItem(props) {
|
|
|
167
167
|
field: column.field,
|
|
168
168
|
colDef: column
|
|
169
169
|
}) : column.headerClassName;
|
|
170
|
+
const label = (_column$headerName = column.headerName) != null ? _column$headerName : column.field;
|
|
170
171
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
171
172
|
ref: headerCellRef,
|
|
172
173
|
className: clsx(classes.root, headerClassName),
|
|
@@ -179,7 +180,8 @@ function GridColumnHeaderItem(props) {
|
|
|
179
180
|
role: "columnheader",
|
|
180
181
|
tabIndex: tabIndex,
|
|
181
182
|
"aria-colindex": colIndex + 1,
|
|
182
|
-
"aria-sort": ariaSort
|
|
183
|
+
"aria-sort": ariaSort,
|
|
184
|
+
"aria-label": column.renderHeader && headerComponent == null ? label : undefined
|
|
183
185
|
}, mouseEventsHandlers, {
|
|
184
186
|
children: [/*#__PURE__*/_jsxs("div", _extends({
|
|
185
187
|
className: classes.draggableContainer,
|
|
@@ -189,8 +191,8 @@ function GridColumnHeaderItem(props) {
|
|
|
189
191
|
className: classes.titleContainer,
|
|
190
192
|
children: [/*#__PURE__*/_jsx("div", {
|
|
191
193
|
className: classes.titleContainerContent,
|
|
192
|
-
children: headerComponent
|
|
193
|
-
label:
|
|
194
|
+
children: column.renderHeader ? headerComponent : /*#__PURE__*/_jsx(GridColumnHeaderTitle, {
|
|
195
|
+
label: label,
|
|
194
196
|
description: column.description,
|
|
195
197
|
columnWidth: width
|
|
196
198
|
})
|
|
@@ -165,7 +165,7 @@ export const GridRootStyles = styled('div', {
|
|
|
165
165
|
minWidth: 0,
|
|
166
166
|
flex: 1,
|
|
167
167
|
whiteSpace: 'nowrap',
|
|
168
|
-
|
|
168
|
+
overflowX: 'hidden'
|
|
169
169
|
},
|
|
170
170
|
[`& .${gridClasses.columnHeaderTitleContainerContent}`]: {
|
|
171
171
|
overflow: 'hidden',
|
|
@@ -221,6 +221,9 @@ export const GridRootStyles = styled('div', {
|
|
|
221
221
|
},
|
|
222
222
|
[`&.${gridClasses['columnSeparator--resizing']}`]: {
|
|
223
223
|
color: theme.palette.text.primary
|
|
224
|
+
},
|
|
225
|
+
'& svg': {
|
|
226
|
+
pointerEvents: 'none'
|
|
224
227
|
}
|
|
225
228
|
},
|
|
226
229
|
[`& .${gridClasses.iconSeparator}`]: {
|
|
@@ -81,7 +81,7 @@ export function GridColumnsPanel(props) {
|
|
|
81
81
|
return apiRef.current.setColumnVisibilityModel({});
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.map(col => [col.field, false])));
|
|
84
|
+
return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.filter(col => col.hideable !== false).map(col => [col.field, false])));
|
|
85
85
|
} // TODO v6: Remove
|
|
86
86
|
|
|
87
87
|
|
|
@@ -135,7 +135,6 @@ export function GridColumnsPanel(props) {
|
|
|
135
135
|
checked: columnVisibilityModel[column.field] !== false,
|
|
136
136
|
onClick: toggleColumn,
|
|
137
137
|
name: column.field,
|
|
138
|
-
color: "primary",
|
|
139
138
|
size: "small"
|
|
140
139
|
}, (_rootProps$components2 = rootProps.componentsProps) == null ? void 0 : _rootProps$components2.baseSwitch)),
|
|
141
140
|
label: column.headerName || column.field
|
|
@@ -152,13 +151,11 @@ export function GridColumnsPanel(props) {
|
|
|
152
151
|
})
|
|
153
152
|
}), /*#__PURE__*/_jsxs(GridPanelFooter, {
|
|
154
153
|
children: [/*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
|
|
155
|
-
onClick: () => toggleAllColumns(false)
|
|
156
|
-
color: "primary"
|
|
154
|
+
onClick: () => toggleAllColumns(false)
|
|
157
155
|
}, (_rootProps$components3 = rootProps.componentsProps) == null ? void 0 : _rootProps$components3.baseButton, {
|
|
158
156
|
children: apiRef.current.getLocaleText('columnsPanelHideAllButton')
|
|
159
157
|
})), /*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
|
|
160
|
-
onClick: () => toggleAllColumns(true)
|
|
161
|
-
color: "primary"
|
|
158
|
+
onClick: () => toggleAllColumns(true)
|
|
162
159
|
}, (_rootProps$components4 = rootProps.componentsProps) == null ? void 0 : _rootProps$components4.baseButton, {
|
|
163
160
|
children: apiRef.current.getLocaleText('columnsPanelShowAllButton')
|
|
164
161
|
}))]
|
|
@@ -2,13 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
3
3
|
import { GridFilterItem } from '../../../models/gridFilterItem';
|
|
4
4
|
import type { GridApiCommon } from '../../../models/api/gridApiCommon';
|
|
5
|
-
|
|
5
|
+
import type { ValueOptions } from '../../../models/colDef/gridColDef';
|
|
6
|
+
export interface GridFilterInputMultipleSingleSelectProps extends Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options' | 'renderInput' | 'onChange' | 'value' | 'id' | 'filterOptions' | 'isOptionEqualToValue' | 'limitTags' | 'multiple'> {
|
|
6
7
|
item: GridFilterItem;
|
|
7
8
|
applyValue: (value: GridFilterItem) => void;
|
|
8
9
|
apiRef: React.MutableRefObject<GridApiCommon>;
|
|
9
10
|
focusElementRef?: React.Ref<any>;
|
|
10
11
|
type?: 'singleSelect';
|
|
11
|
-
}
|
|
12
|
+
}
|
|
12
13
|
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): JSX.Element;
|
|
13
14
|
declare namespace GridFilterInputMultipleSingleSelect {
|
|
14
15
|
var propTypes: any;
|
|
@@ -26,9 +26,17 @@ function GridFilterInputMultipleSingleSelect(props) {
|
|
|
26
26
|
const id = useId();
|
|
27
27
|
const resolvedColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
|
|
28
28
|
const resolvedValueOptions = React.useMemo(() => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
29
|
+
if (!(resolvedColumn != null && resolvedColumn.valueOptions)) {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (typeof resolvedColumn.valueOptions === 'function') {
|
|
34
|
+
return resolvedColumn.valueOptions({
|
|
35
|
+
field: resolvedColumn.field
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return resolvedColumn.valueOptions;
|
|
32
40
|
}, [resolvedColumn]);
|
|
33
41
|
const resolvedFormattedValueOptions = React.useMemo(() => {
|
|
34
42
|
return resolvedValueOptions == null ? void 0 : resolvedValueOptions.map(getValueFromOption);
|
|
@@ -85,8 +93,7 @@ function GridFilterInputMultipleSingleSelect(props) {
|
|
|
85
93
|
return /*#__PURE__*/_jsx(Autocomplete, _extends({
|
|
86
94
|
multiple: true,
|
|
87
95
|
limitTags: 1,
|
|
88
|
-
options: resolvedValueOptions
|
|
89
|
-
,
|
|
96
|
+
options: resolvedValueOptions,
|
|
90
97
|
isOptionEqualToValue: isOptionEqualToValue,
|
|
91
98
|
filterOptions: filter,
|
|
92
99
|
id: id,
|
|
@@ -72,9 +72,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
|
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
apiRef.current.
|
|
76
|
-
items: [...items, defaultItem]
|
|
77
|
-
}));
|
|
75
|
+
apiRef.current.upsertFilterItems([...items, defaultItem]);
|
|
78
76
|
};
|
|
79
77
|
|
|
80
78
|
const deleteFilter = React.useCallback(item => {
|
|
@@ -115,8 +113,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
|
|
|
115
113
|
}), !rootProps.disableMultipleColumnsFiltering && /*#__PURE__*/_jsx(GridPanelFooter, {
|
|
116
114
|
children: /*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
|
|
117
115
|
onClick: addNewFilter,
|
|
118
|
-
startIcon: /*#__PURE__*/_jsx(GridAddIcon, {})
|
|
119
|
-
color: "primary"
|
|
116
|
+
startIcon: /*#__PURE__*/_jsx(GridAddIcon, {})
|
|
120
117
|
}, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseButton, {
|
|
121
118
|
children: apiRef.current.getLocaleText('filterPanelAddFilter')
|
|
122
119
|
}))
|
|
@@ -41,7 +41,6 @@ export const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function G
|
|
|
41
41
|
return /*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
|
|
42
42
|
ref: ref,
|
|
43
43
|
size: "small",
|
|
44
|
-
color: "primary",
|
|
45
44
|
"aria-label": apiRef.current.getLocaleText('toolbarColumnsLabel'),
|
|
46
45
|
startIcon: /*#__PURE__*/_jsx(rootProps.components.ColumnSelectorIcon, {})
|
|
47
46
|
}, other, {
|
|
@@ -95,7 +95,6 @@ export const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function
|
|
|
95
95
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
96
96
|
children: [/*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
|
|
97
97
|
ref: handleRef,
|
|
98
|
-
color: "primary",
|
|
99
98
|
size: "small",
|
|
100
99
|
startIcon: startIcon,
|
|
101
100
|
"aria-label": apiRef.current.getLocaleText('toolbarDensityLabel'),
|