@mui/x-data-grid 8.24.0 → 8.26.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 +196 -6479
- package/components/GridColumnHeaders.js +1 -0
- package/components/GridFooter.js +1 -0
- package/components/GridHeaders.js +1 -0
- package/components/GridLoadingOverlay.js +1 -0
- package/components/GridNoColumnsOverlay.js +1 -0
- package/components/GridNoResultsOverlay.js +1 -0
- package/components/GridNoRowsOverlay.js +1 -0
- package/components/GridPagination.js +1 -0
- package/components/GridRowCount.js +1 -0
- package/components/GridSelectedRowCount.js +1 -0
- package/components/GridShadowScrollArea.js +1 -0
- package/components/GridSkeletonLoadingOverlay.js +1 -0
- package/components/cell/GridActionsCell.d.ts +22 -2
- package/components/cell/GridActionsCell.js +15 -5
- package/components/cell/GridActionsCellItem.js +1 -0
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +1 -0
- package/components/columnHeaders/GridBaseColumnHeaders.js +1 -0
- package/components/columnHeaders/GridIconButtonContainer.js +1 -0
- package/components/containers/GridFooterContainer.js +1 -0
- package/components/containers/GridOverlay.js +1 -0
- package/components/containers/GridRoot.js +1 -0
- package/components/containers/GridToolbarContainer.js +1 -0
- package/components/menu/columnMenu/GridColumnMenu.js +1 -0
- package/components/menu/columnMenu/GridColumnMenuContainer.js +1 -0
- package/components/panel/GridPanelWrapper.js +1 -0
- package/components/panel/filterPanel/GridFilterForm.js +1 -0
- package/components/toolbar/GridToolbar.d.ts +5 -0
- package/components/toolbar/GridToolbar.js +6 -0
- package/components/toolbar/GridToolbarColumnsButton.js +1 -0
- package/components/toolbar/GridToolbarExport.js +1 -0
- package/components/toolbar/GridToolbarFilterButton.js +1 -0
- package/components/toolbarV8/GridToolbar.d.ts +1 -1
- package/components/toolbarV8/GridToolbar.js +26 -24
- package/components/virtualization/GridMainContainer.js +1 -0
- package/components/virtualization/GridVirtualScrollerContent.js +1 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +1 -0
- package/constants/localeTextConstants.js +3 -0
- package/context/GridContextProvider.js +1 -0
- package/esm/components/GridColumnHeaders.js +2 -0
- package/esm/components/GridFooter.js +2 -0
- package/esm/components/GridHeaders.js +2 -0
- package/esm/components/GridLoadingOverlay.js +2 -0
- package/esm/components/GridNoColumnsOverlay.js +2 -0
- package/esm/components/GridNoResultsOverlay.js +2 -0
- package/esm/components/GridNoRowsOverlay.js +2 -0
- package/esm/components/GridPagination.js +2 -0
- package/esm/components/GridRowCount.js +2 -0
- package/esm/components/GridSelectedRowCount.js +2 -0
- package/esm/components/GridShadowScrollArea.js +2 -0
- package/esm/components/GridSkeletonLoadingOverlay.js +2 -0
- package/esm/components/cell/GridActionsCell.d.ts +22 -2
- package/esm/components/cell/GridActionsCell.js +15 -5
- package/esm/components/cell/GridActionsCellItem.js +2 -0
- package/esm/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -0
- package/esm/components/columnHeaders/GridBaseColumnHeaders.js +2 -0
- package/esm/components/columnHeaders/GridIconButtonContainer.js +2 -0
- package/esm/components/containers/GridFooterContainer.js +2 -0
- package/esm/components/containers/GridOverlay.js +2 -0
- package/esm/components/containers/GridRoot.js +2 -0
- package/esm/components/containers/GridToolbarContainer.js +2 -0
- package/esm/components/menu/columnMenu/GridColumnMenu.js +2 -0
- package/esm/components/menu/columnMenu/GridColumnMenuContainer.js +2 -0
- package/esm/components/panel/GridPanelWrapper.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterForm.js +2 -0
- package/esm/components/toolbar/GridToolbar.d.ts +5 -0
- package/esm/components/toolbar/GridToolbar.js +7 -0
- package/esm/components/toolbar/GridToolbarColumnsButton.js +2 -0
- package/esm/components/toolbar/GridToolbarExport.js +2 -0
- package/esm/components/toolbar/GridToolbarFilterButton.js +2 -0
- package/esm/components/toolbarV8/GridToolbar.d.ts +1 -1
- package/esm/components/toolbarV8/GridToolbar.js +26 -24
- package/esm/components/virtualization/GridMainContainer.js +2 -0
- package/esm/components/virtualization/GridVirtualScrollerContent.js +2 -0
- package/esm/components/virtualization/GridVirtualScrollerRenderZone.js +2 -0
- package/esm/constants/localeTextConstants.js +3 -0
- package/esm/context/GridContextProvider.js +2 -0
- package/esm/hooks/core/pipeProcessing/useGridPipeProcessing.js +2 -0
- package/esm/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -0
- package/esm/hooks/core/useGridProps.js +5 -3
- package/esm/hooks/core/useGridRefs.js +2 -0
- package/esm/hooks/core/useGridStateInitialization.js +2 -0
- package/esm/hooks/features/columnMenu/useGridColumnMenu.js +2 -0
- package/esm/hooks/features/focus/useGridFocus.js +26 -2
- package/esm/hooks/features/scroll/useGridScroll.js +3 -3
- package/esm/hooks/utils/useGridApiContext.js +2 -0
- package/esm/hooks/utils/useGridApiMethod.js +2 -0
- package/esm/hooks/utils/useGridApiRef.js +2 -0
- package/esm/hooks/utils/useGridConfiguration.js +2 -0
- package/esm/hooks/utils/useGridInitializeState.js +2 -0
- package/esm/hooks/utils/useGridLogger.js +2 -0
- package/esm/hooks/utils/useGridRootProps.js +2 -0
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +1 -1
- package/esm/internals/index.js +1 -1
- package/esm/locales/arSD.js +3 -0
- package/esm/locales/beBY.js +3 -0
- package/esm/locales/bgBG.js +3 -0
- package/esm/locales/bnBD.js +3 -0
- package/esm/locales/caES.js +3 -0
- package/esm/locales/csCZ.js +3 -0
- package/esm/locales/daDK.js +3 -0
- package/esm/locales/deDE.js +3 -0
- package/esm/locales/elGR.js +3 -0
- package/esm/locales/esES.js +3 -0
- package/esm/locales/faIR.js +3 -0
- package/esm/locales/fiFI.js +3 -0
- package/esm/locales/frFR.js +3 -0
- package/esm/locales/heIL.js +3 -0
- package/esm/locales/hrHR.js +3 -0
- package/esm/locales/huHU.js +3 -0
- package/esm/locales/hyAM.js +3 -0
- package/esm/locales/idID.js +3 -0
- package/esm/locales/isIS.js +3 -0
- package/esm/locales/itIT.js +3 -0
- package/esm/locales/jaJP.js +3 -0
- package/esm/locales/koKR.js +3 -0
- package/esm/locales/nbNO.js +3 -0
- package/esm/locales/nlNL.js +3 -0
- package/esm/locales/nnNO.js +3 -0
- package/esm/locales/plPL.js +3 -0
- package/esm/locales/ptBR.js +3 -0
- package/esm/locales/ptPT.js +3 -0
- package/esm/locales/roRO.js +3 -0
- package/esm/locales/ruRU.js +3 -0
- package/esm/locales/skSK.js +3 -0
- package/esm/locales/svSE.js +3 -0
- package/esm/locales/trTR.js +3 -0
- package/esm/locales/ukUA.js +3 -0
- package/esm/locales/urPK.js +3 -0
- package/esm/locales/viVN.js +3 -0
- package/esm/locales/zhCN.js +3 -0
- package/esm/locales/zhHK.js +3 -0
- package/esm/locales/zhTW.js +3 -0
- package/esm/material/icons/index.d.ts +2 -0
- package/esm/material/icons/index.js +6 -0
- package/esm/material/index.js +3 -1
- package/esm/models/api/gridLocaleTextApi.d.ts +2 -0
- package/esm/models/gridIconSlotsComponent.d.ts +10 -0
- package/esm/models/gridStateCommunity.d.ts +1 -1
- package/esm/utils/keyboardUtils.d.ts +3 -1
- package/esm/utils/keyboardUtils.js +6 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +1 -0
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +1 -0
- package/hooks/core/useGridProps.js +5 -3
- package/hooks/core/useGridRefs.js +1 -0
- package/hooks/core/useGridStateInitialization.js +1 -0
- package/hooks/features/columnMenu/useGridColumnMenu.js +1 -0
- package/hooks/features/focus/useGridFocus.js +25 -1
- package/hooks/features/scroll/useGridScroll.js +3 -3
- package/hooks/utils/useGridApiContext.js +1 -0
- package/hooks/utils/useGridApiMethod.js +1 -0
- package/hooks/utils/useGridApiRef.js +1 -0
- package/hooks/utils/useGridConfiguration.js +1 -0
- package/hooks/utils/useGridInitializeState.js +1 -0
- package/hooks/utils/useGridLogger.js +1 -0
- package/hooks/utils/useGridRootProps.js +1 -0
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +14 -0
- package/locales/arSD.js +3 -0
- package/locales/beBY.js +3 -0
- package/locales/bgBG.js +3 -0
- package/locales/bnBD.js +3 -0
- package/locales/caES.js +3 -0
- package/locales/csCZ.js +3 -0
- package/locales/daDK.js +3 -0
- package/locales/deDE.js +3 -0
- package/locales/elGR.js +3 -0
- package/locales/esES.js +3 -0
- package/locales/faIR.js +3 -0
- package/locales/fiFI.js +3 -0
- package/locales/frFR.js +3 -0
- package/locales/heIL.js +3 -0
- package/locales/hrHR.js +3 -0
- package/locales/huHU.js +3 -0
- package/locales/hyAM.js +3 -0
- package/locales/idID.js +3 -0
- package/locales/isIS.js +3 -0
- package/locales/itIT.js +3 -0
- package/locales/jaJP.js +3 -0
- package/locales/koKR.js +3 -0
- package/locales/nbNO.js +3 -0
- package/locales/nlNL.js +3 -0
- package/locales/nnNO.js +3 -0
- package/locales/plPL.js +3 -0
- package/locales/ptBR.js +3 -0
- package/locales/ptPT.js +3 -0
- package/locales/roRO.js +3 -0
- package/locales/ruRU.js +3 -0
- package/locales/skSK.js +3 -0
- package/locales/svSE.js +3 -0
- package/locales/trTR.js +3 -0
- package/locales/ukUA.js +3 -0
- package/locales/urPK.js +3 -0
- package/locales/viVN.js +3 -0
- package/locales/zhCN.js +3 -0
- package/locales/zhHK.js +3 -0
- package/locales/zhTW.js +3 -0
- package/material/icons/index.d.ts +2 -0
- package/material/icons/index.js +7 -1
- package/material/index.js +2 -0
- package/models/api/gridLocaleTextApi.d.ts +2 -0
- package/models/gridIconSlotsComponent.d.ts +10 -0
- package/models/gridStateCommunity.d.ts +1 -1
- package/package.json +3 -3
- package/utils/keyboardUtils.d.ts +3 -1
- package/utils/keyboardUtils.js +8 -0
package/esm/locales/deDE.js
CHANGED
|
@@ -12,6 +12,9 @@ const deDEGrid = {
|
|
|
12
12
|
toolbarDensityCompact: 'Kompakt',
|
|
13
13
|
toolbarDensityStandard: 'Standard',
|
|
14
14
|
toolbarDensityComfortable: 'Breit',
|
|
15
|
+
// Undo/redo toolbar button text
|
|
16
|
+
toolbarUndo: 'Rückgängig',
|
|
17
|
+
toolbarRedo: 'Wiederholen',
|
|
15
18
|
// Columns selector toolbar button text
|
|
16
19
|
toolbarColumns: 'Spalten',
|
|
17
20
|
toolbarColumnsLabel: 'Zeige Spaltenauswahl',
|
package/esm/locales/elGR.js
CHANGED
|
@@ -13,6 +13,9 @@ const elGRGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Συμπαγής',
|
|
14
14
|
toolbarDensityStandard: 'Προκαθορισμένο',
|
|
15
15
|
toolbarDensityComfortable: 'Πλατύ',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Αναίρεση',
|
|
18
|
+
toolbarRedo: 'Επανάληψη',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Στήλες',
|
|
18
21
|
toolbarColumnsLabel: 'Επιλέξτε στήλες',
|
package/esm/locales/esES.js
CHANGED
|
@@ -12,6 +12,9 @@ const esESGrid = {
|
|
|
12
12
|
toolbarDensityCompact: 'Compacta',
|
|
13
13
|
toolbarDensityStandard: 'Estándar',
|
|
14
14
|
toolbarDensityComfortable: 'Cómoda',
|
|
15
|
+
// Undo/redo toolbar button text
|
|
16
|
+
toolbarUndo: 'Deshacer',
|
|
17
|
+
toolbarRedo: 'Rehacer',
|
|
15
18
|
// Columns selector toolbar button text
|
|
16
19
|
toolbarColumns: 'Columnas',
|
|
17
20
|
toolbarColumnsLabel: 'Seleccionar columnas',
|
package/esm/locales/faIR.js
CHANGED
|
@@ -13,6 +13,9 @@ const faIRGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'فشرده',
|
|
14
14
|
toolbarDensityStandard: 'استاندارد',
|
|
15
15
|
toolbarDensityComfortable: 'راحت',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'واگرد',
|
|
18
|
+
toolbarRedo: 'ازنو',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'ستونها',
|
|
18
21
|
toolbarColumnsLabel: 'ستونها را انتخاب کنید',
|
package/esm/locales/fiFI.js
CHANGED
|
@@ -13,6 +13,9 @@ const fiFIGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Kompakti',
|
|
14
14
|
toolbarDensityStandard: 'Vakio',
|
|
15
15
|
toolbarDensityComfortable: 'Mukava',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Kumoa',
|
|
18
|
+
toolbarRedo: 'Tee uudelleen',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Sarakkeet',
|
|
18
21
|
toolbarColumnsLabel: 'Valitse sarakkeet',
|
package/esm/locales/frFR.js
CHANGED
|
@@ -13,6 +13,9 @@ const frFRGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Compacte',
|
|
14
14
|
toolbarDensityStandard: 'Standard',
|
|
15
15
|
toolbarDensityComfortable: 'Confortable',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Annuler',
|
|
18
|
+
toolbarRedo: 'Rétablir',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Colonnes',
|
|
18
21
|
toolbarColumnsLabel: 'Choisir les colonnes',
|
package/esm/locales/heIL.js
CHANGED
|
@@ -13,6 +13,9 @@ const heILGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'דחוסה',
|
|
14
14
|
toolbarDensityStandard: 'רגילה',
|
|
15
15
|
toolbarDensityComfortable: 'אוורירית',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'בטל',
|
|
18
|
+
toolbarRedo: 'בצע שוב',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'עמודות',
|
|
18
21
|
toolbarColumnsLabel: 'בחר עמודות',
|
package/esm/locales/hrHR.js
CHANGED
|
@@ -13,6 +13,9 @@ const hrHRGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Kompaktno',
|
|
14
14
|
toolbarDensityStandard: 'Standardno',
|
|
15
15
|
toolbarDensityComfortable: 'Udobno',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Poništi',
|
|
18
|
+
toolbarRedo: 'Ponovi',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Stupci',
|
|
18
21
|
toolbarColumnsLabel: 'Odaberite stupce',
|
package/esm/locales/huHU.js
CHANGED
|
@@ -13,6 +13,9 @@ const huHUGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Kompakt',
|
|
14
14
|
toolbarDensityStandard: 'Normál',
|
|
15
15
|
toolbarDensityComfortable: 'Kényelmes',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Visszavonás',
|
|
18
|
+
toolbarRedo: 'Újra',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Oszlopok',
|
|
18
21
|
toolbarColumnsLabel: 'Oszlopok kiválasztása',
|
package/esm/locales/hyAM.js
CHANGED
|
@@ -13,6 +13,9 @@ const hyAMGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Կոմպակտ',
|
|
14
14
|
toolbarDensityStandard: 'Ստանդարտ',
|
|
15
15
|
toolbarDensityComfortable: 'Հարմարավետ',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Հետսարկել',
|
|
18
|
+
toolbarRedo: 'Կրկնվել',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Սյունակներ',
|
|
18
21
|
toolbarColumnsLabel: 'Ընտրել սյունակներ',
|
package/esm/locales/idID.js
CHANGED
|
@@ -12,6 +12,9 @@ export const idIDGrid = {
|
|
|
12
12
|
toolbarDensityCompact: 'Ringkas',
|
|
13
13
|
toolbarDensityStandard: 'Standar',
|
|
14
14
|
toolbarDensityComfortable: 'Nyaman',
|
|
15
|
+
// Undo/redo toolbar button text
|
|
16
|
+
toolbarUndo: 'Urungkan',
|
|
17
|
+
toolbarRedo: 'Ulangi',
|
|
15
18
|
// Columns selector toolbar button text
|
|
16
19
|
toolbarColumns: 'Kolom',
|
|
17
20
|
toolbarColumnsLabel: 'Pilih kolom',
|
package/esm/locales/isIS.js
CHANGED
|
@@ -13,6 +13,9 @@ const isISGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Þétt',
|
|
14
14
|
toolbarDensityStandard: 'Staðlað',
|
|
15
15
|
toolbarDensityComfortable: 'Rúmlegt',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Afturkalla',
|
|
18
|
+
toolbarRedo: 'Endurgera',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Dálkar',
|
|
18
21
|
toolbarColumnsLabel: 'Veldu dálka',
|
package/esm/locales/itIT.js
CHANGED
|
@@ -12,6 +12,9 @@ const itITGrid = {
|
|
|
12
12
|
toolbarDensityCompact: 'Compatta',
|
|
13
13
|
toolbarDensityStandard: 'Standard',
|
|
14
14
|
toolbarDensityComfortable: 'Comoda',
|
|
15
|
+
// Undo/redo toolbar button text
|
|
16
|
+
toolbarUndo: 'Annulla',
|
|
17
|
+
toolbarRedo: 'Ripeti',
|
|
15
18
|
// Columns selector toolbar button text
|
|
16
19
|
toolbarColumns: 'Colonne',
|
|
17
20
|
toolbarColumnsLabel: 'Seleziona le colonne',
|
package/esm/locales/jaJP.js
CHANGED
|
@@ -13,6 +13,9 @@ const jaJPGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'コンパクト',
|
|
14
14
|
toolbarDensityStandard: '標準',
|
|
15
15
|
toolbarDensityComfortable: '広め',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: '元に戻す',
|
|
18
|
+
toolbarRedo: 'やり直す',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: '列一覧',
|
|
18
21
|
toolbarColumnsLabel: '列選択',
|
package/esm/locales/koKR.js
CHANGED
|
@@ -12,6 +12,9 @@ const koKRGrid = {
|
|
|
12
12
|
toolbarDensityCompact: '좁게',
|
|
13
13
|
toolbarDensityStandard: '기본',
|
|
14
14
|
toolbarDensityComfortable: '넓게',
|
|
15
|
+
// Undo/redo toolbar button text
|
|
16
|
+
toolbarUndo: '실행 취소',
|
|
17
|
+
toolbarRedo: '다시 실행',
|
|
15
18
|
// Columns selector toolbar button text
|
|
16
19
|
toolbarColumns: '열 목록',
|
|
17
20
|
toolbarColumnsLabel: '열 선택',
|
package/esm/locales/nbNO.js
CHANGED
|
@@ -13,6 +13,9 @@ const nbNOGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Kompakt',
|
|
14
14
|
toolbarDensityStandard: 'Standard',
|
|
15
15
|
toolbarDensityComfortable: 'Komfortabelt',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Angre',
|
|
18
|
+
toolbarRedo: 'Gjør om',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Kolonner',
|
|
18
21
|
toolbarColumnsLabel: 'Velg kolonner',
|
package/esm/locales/nlNL.js
CHANGED
|
@@ -13,6 +13,9 @@ const nlNLGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Compact',
|
|
14
14
|
toolbarDensityStandard: 'Normaal',
|
|
15
15
|
toolbarDensityComfortable: 'Breed',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Ongedaan maken',
|
|
18
|
+
toolbarRedo: 'Opnieuw',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Kolommen',
|
|
18
21
|
toolbarColumnsLabel: 'Kies kolommen',
|
package/esm/locales/nnNO.js
CHANGED
|
@@ -12,6 +12,9 @@ const nnNOGrid = {
|
|
|
12
12
|
toolbarDensityCompact: 'Kompakt',
|
|
13
13
|
toolbarDensityStandard: 'Standard',
|
|
14
14
|
toolbarDensityComfortable: 'Komfortabelt',
|
|
15
|
+
// Undo/redo toolbar button text
|
|
16
|
+
toolbarUndo: 'Angre',
|
|
17
|
+
toolbarRedo: 'Gjer om',
|
|
15
18
|
// Columns selector toolbar button text
|
|
16
19
|
toolbarColumns: 'Kolonner',
|
|
17
20
|
toolbarColumnsLabel: 'Vel kolonner',
|
package/esm/locales/plPL.js
CHANGED
|
@@ -13,6 +13,9 @@ const plPLGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Kompakt',
|
|
14
14
|
toolbarDensityStandard: 'Standard',
|
|
15
15
|
toolbarDensityComfortable: 'Komfort',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Cofnij',
|
|
18
|
+
toolbarRedo: 'Ponów',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Kolumny',
|
|
18
21
|
toolbarColumnsLabel: 'Zaznacz kolumny',
|
package/esm/locales/ptBR.js
CHANGED
|
@@ -12,6 +12,9 @@ const ptBRGrid = {
|
|
|
12
12
|
toolbarDensityCompact: 'Compacto',
|
|
13
13
|
toolbarDensityStandard: 'Padrão',
|
|
14
14
|
toolbarDensityComfortable: 'Confortável',
|
|
15
|
+
// Undo/redo toolbar button text
|
|
16
|
+
toolbarUndo: 'Desfazer',
|
|
17
|
+
toolbarRedo: 'Refazer',
|
|
15
18
|
// Columns selector toolbar button text
|
|
16
19
|
toolbarColumns: 'Colunas',
|
|
17
20
|
toolbarColumnsLabel: 'Exibir seletor de colunas',
|
package/esm/locales/ptPT.js
CHANGED
|
@@ -12,6 +12,9 @@ const ptPTGrid = {
|
|
|
12
12
|
toolbarDensityCompact: 'Compacto',
|
|
13
13
|
toolbarDensityStandard: 'Padrão',
|
|
14
14
|
toolbarDensityComfortable: 'Confortável',
|
|
15
|
+
// Undo/redo toolbar button text
|
|
16
|
+
toolbarUndo: 'Anular',
|
|
17
|
+
toolbarRedo: 'Refazer',
|
|
15
18
|
// Columns selector toolbar button text
|
|
16
19
|
toolbarColumns: 'Colunas',
|
|
17
20
|
toolbarColumnsLabel: 'Selecione colunas',
|
package/esm/locales/roRO.js
CHANGED
|
@@ -13,6 +13,9 @@ const roROGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Compact',
|
|
14
14
|
toolbarDensityStandard: 'Standard',
|
|
15
15
|
toolbarDensityComfortable: 'Lat',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Anulează',
|
|
18
|
+
toolbarRedo: 'Refă',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Coloane',
|
|
18
21
|
toolbarColumnsLabel: 'Afișează selecție coloane',
|
package/esm/locales/ruRU.js
CHANGED
|
@@ -24,6 +24,9 @@ const ruRUGrid = {
|
|
|
24
24
|
toolbarDensityCompact: 'Компактная',
|
|
25
25
|
toolbarDensityStandard: 'Стандартная',
|
|
26
26
|
toolbarDensityComfortable: 'Комфортная',
|
|
27
|
+
// Undo/redo toolbar button text
|
|
28
|
+
toolbarUndo: 'Отменить',
|
|
29
|
+
toolbarRedo: 'Повторить',
|
|
27
30
|
// Columns selector toolbar button text
|
|
28
31
|
toolbarColumns: 'Столбцы',
|
|
29
32
|
toolbarColumnsLabel: 'Выделите столбцы',
|
package/esm/locales/skSK.js
CHANGED
|
@@ -13,6 +13,9 @@ const skSKGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Kompaktná',
|
|
14
14
|
toolbarDensityStandard: 'Štandartná',
|
|
15
15
|
toolbarDensityComfortable: 'Komfortná',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Späť',
|
|
18
|
+
toolbarRedo: 'Znova',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Stĺpce',
|
|
18
21
|
toolbarColumnsLabel: 'Vybrať stĺpce',
|
package/esm/locales/svSE.js
CHANGED
|
@@ -13,6 +13,9 @@ const svSEGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Kompakt',
|
|
14
14
|
toolbarDensityStandard: 'Standard',
|
|
15
15
|
toolbarDensityComfortable: 'Luftig',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Ångra',
|
|
18
|
+
toolbarRedo: 'Gör om',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Kolumner',
|
|
18
21
|
toolbarColumnsLabel: 'Välj kolumner',
|
package/esm/locales/trTR.js
CHANGED
|
@@ -13,6 +13,9 @@ const trTRGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Sıkı',
|
|
14
14
|
toolbarDensityStandard: 'Standart',
|
|
15
15
|
toolbarDensityComfortable: 'Rahat',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Geri al',
|
|
18
|
+
toolbarRedo: 'Yinele',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Sütunlar',
|
|
18
21
|
toolbarColumnsLabel: 'Sütun seç',
|
package/esm/locales/ukUA.js
CHANGED
|
@@ -24,6 +24,9 @@ const ukUAGrid = {
|
|
|
24
24
|
toolbarDensityCompact: 'Компактний',
|
|
25
25
|
toolbarDensityStandard: 'Стандартний',
|
|
26
26
|
toolbarDensityComfortable: 'Комфортний',
|
|
27
|
+
// Undo/redo toolbar button text
|
|
28
|
+
toolbarUndo: 'Скасувати',
|
|
29
|
+
toolbarRedo: 'Повторити',
|
|
27
30
|
// Columns selector toolbar button text
|
|
28
31
|
toolbarColumns: 'Стовпці',
|
|
29
32
|
toolbarColumnsLabel: 'Виділіть стовпці',
|
package/esm/locales/urPK.js
CHANGED
|
@@ -13,6 +13,9 @@ const urPKGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'تنگ',
|
|
14
14
|
toolbarDensityStandard: 'درمیانہ',
|
|
15
15
|
toolbarDensityComfortable: 'مناسب',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'واپس',
|
|
18
|
+
toolbarRedo: 'دوبارہ',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'کالمز',
|
|
18
21
|
toolbarColumnsLabel: 'کالمز کو منتخب کریں',
|
package/esm/locales/viVN.js
CHANGED
|
@@ -13,6 +13,9 @@ const viVNGrid = {
|
|
|
13
13
|
toolbarDensityCompact: 'Trung bình',
|
|
14
14
|
toolbarDensityStandard: 'Tiêu chuẩn',
|
|
15
15
|
toolbarDensityComfortable: 'Rộng',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: 'Hoàn tác',
|
|
18
|
+
toolbarRedo: 'Làm lại',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: 'Cột',
|
|
18
21
|
toolbarColumnsLabel: 'Chọn cột',
|
package/esm/locales/zhCN.js
CHANGED
|
@@ -13,6 +13,9 @@ const zhCNGrid = {
|
|
|
13
13
|
toolbarDensityCompact: '紧密',
|
|
14
14
|
toolbarDensityStandard: '标准',
|
|
15
15
|
toolbarDensityComfortable: '稀疏',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: '撤销',
|
|
18
|
+
toolbarRedo: '重做',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: '列',
|
|
18
21
|
toolbarColumnsLabel: '选择列',
|
package/esm/locales/zhHK.js
CHANGED
|
@@ -13,6 +13,9 @@ const zhHKGrid = {
|
|
|
13
13
|
toolbarDensityCompact: '袖珍的',
|
|
14
14
|
toolbarDensityStandard: '標準',
|
|
15
15
|
toolbarDensityComfortable: '舒服的',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: '復原',
|
|
18
|
+
toolbarRedo: '重做',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: '列',
|
|
18
21
|
toolbarColumnsLabel: '選擇列',
|
package/esm/locales/zhTW.js
CHANGED
|
@@ -13,6 +13,9 @@ const zhTWGrid = {
|
|
|
13
13
|
toolbarDensityCompact: '緊湊',
|
|
14
14
|
toolbarDensityStandard: '標準',
|
|
15
15
|
toolbarDensityComfortable: '舒適',
|
|
16
|
+
// Undo/redo toolbar button text
|
|
17
|
+
toolbarUndo: '復原',
|
|
18
|
+
toolbarRedo: '重做',
|
|
16
19
|
// Columns selector toolbar button text
|
|
17
20
|
toolbarColumns: '欄位',
|
|
18
21
|
toolbarColumnsLabel: '選擇欄位',
|
|
@@ -7,6 +7,8 @@ export declare const GridFilterAltIcon: (props: import("@mui/x-data-grid").GridB
|
|
|
7
7
|
export declare const GridSearchIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
8
8
|
export declare const GridMenuIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
9
9
|
export declare const GridCheckCircleIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
10
|
+
export declare const GridUndoIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
11
|
+
export declare const GridRedoIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
10
12
|
export declare const GridColumnIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
11
13
|
export declare const GridSeparatorIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
12
14
|
export declare const GridViewHeadlineIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
@@ -27,6 +27,12 @@ export const GridMenuIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
|
27
27
|
export const GridCheckCircleIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
28
28
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
29
29
|
}), 'CheckCircle');
|
|
30
|
+
export const GridUndoIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
31
|
+
d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"
|
|
32
|
+
}), 'Undo');
|
|
33
|
+
export const GridRedoIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
34
|
+
d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"
|
|
35
|
+
}), 'Redo');
|
|
30
36
|
export const GridColumnIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
31
37
|
d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"
|
|
32
38
|
}), 'ColumnIcon');
|
package/esm/material/index.js
CHANGED
|
@@ -64,7 +64,7 @@ import MUITab from '@mui/material/Tab';
|
|
|
64
64
|
import MUIToggleButton from '@mui/material/ToggleButton';
|
|
65
65
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
66
66
|
import useId from '@mui/utils/useId';
|
|
67
|
-
import { GridAddIcon, GridArrowDownwardIcon, GridArrowUpwardIcon, GridCheckIcon, GridCloseIcon, GridColumnIcon, GridDragIcon, GridExpandMoreIcon, GridFilterAltIcon, GridFilterListIcon, GridKeyboardArrowRight, GridMoreVertIcon, GridRemoveIcon, GridSearchIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridVisibilityOffIcon, GridViewColumnIcon, GridClearIcon, GridLoadIcon, GridDeleteForeverIcon, GridDownloadIcon } from "./icons/index.js";
|
|
67
|
+
import { GridAddIcon, GridArrowDownwardIcon, GridArrowUpwardIcon, GridCheckIcon, GridCloseIcon, GridUndoIcon, GridRedoIcon, GridColumnIcon, GridDragIcon, GridExpandMoreIcon, GridFilterAltIcon, GridFilterListIcon, GridKeyboardArrowRight, GridMoreVertIcon, GridRemoveIcon, GridSearchIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridVisibilityOffIcon, GridViewColumnIcon, GridClearIcon, GridLoadIcon, GridDeleteForeverIcon, GridDownloadIcon } from "./icons/index.js";
|
|
68
68
|
import { GridColumnUnsortedIcon } from "../components/GridColumnUnsortedIcon.js";
|
|
69
69
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
70
70
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
@@ -773,6 +773,8 @@ const iconSlots = {
|
|
|
773
773
|
columnMenuIcon: GridTripleDotsVerticalIcon,
|
|
774
774
|
openFilterButtonIcon: GridFilterListIcon,
|
|
775
775
|
filterPanelDeleteIcon: GridCloseIcon,
|
|
776
|
+
undoIcon: GridUndoIcon,
|
|
777
|
+
redoIcon: GridRedoIcon,
|
|
776
778
|
columnFilteredIcon: GridFilterAltIcon,
|
|
777
779
|
columnSelectorIcon: GridColumnIcon,
|
|
778
780
|
columnUnsortedIcon: GridColumnUnsortedIcon,
|
|
@@ -14,6 +14,8 @@ export interface GridLocaleText {
|
|
|
14
14
|
toolbarDensityCompact: string;
|
|
15
15
|
toolbarDensityStandard: string;
|
|
16
16
|
toolbarDensityComfortable: string;
|
|
17
|
+
toolbarUndo: React.ReactNode;
|
|
18
|
+
toolbarRedo: React.ReactNode;
|
|
17
19
|
toolbarColumns: React.ReactNode;
|
|
18
20
|
toolbarColumnsLabel: string;
|
|
19
21
|
toolbarFilters: React.ReactNode;
|
|
@@ -15,6 +15,16 @@ export interface GridIconSlotsComponent {
|
|
|
15
15
|
* @default GridCloseIcon
|
|
16
16
|
*/
|
|
17
17
|
booleanCellFalseIcon: React.JSXElementConstructor<IconProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Icon displayed on the undo button in the toolbar.
|
|
20
|
+
* @default GridUndoIcon
|
|
21
|
+
*/
|
|
22
|
+
undoIcon: React.JSXElementConstructor<IconProps>;
|
|
23
|
+
/**
|
|
24
|
+
* Icon displayed on the redo button in the toolbar.
|
|
25
|
+
* @default GridRedoIcon
|
|
26
|
+
*/
|
|
27
|
+
redoIcon: React.JSXElementConstructor<IconProps>;
|
|
18
28
|
/**
|
|
19
29
|
* Icon displayed on the side of the column header title to display the filter input component.
|
|
20
30
|
* @default GridTripleDotsVerticalIcon
|
|
@@ -13,7 +13,7 @@ import type { GridRowReorderState } from "../hooks/features/rowReorder/gridRowRe
|
|
|
13
13
|
* Some props are passed on the state to enable grid selectors to select
|
|
14
14
|
* and react to them.
|
|
15
15
|
*/
|
|
16
|
-
export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable'>;
|
|
16
|
+
export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable' | 'isRowSelectable' | 'dataSource'>;
|
|
17
17
|
/**
|
|
18
18
|
* The state of Data Grid.
|
|
19
19
|
*/
|
|
@@ -4,4 +4,6 @@ export declare const isNavigationKey: (key: string) => boolean;
|
|
|
4
4
|
export declare const isKeyboardEvent: (event: any) => event is React.KeyboardEvent<HTMLElement>;
|
|
5
5
|
export declare const isHideMenuKey: (key: React.KeyboardEvent["key"]) => key is "Tab" | "Escape";
|
|
6
6
|
export declare function isPasteShortcut(event: React.KeyboardEvent): boolean;
|
|
7
|
-
export declare function isCopyShortcut(event: KeyboardEvent): boolean;
|
|
7
|
+
export declare function isCopyShortcut(event: KeyboardEvent): boolean;
|
|
8
|
+
export declare function isUndoShortcut(event: React.KeyboardEvent): boolean;
|
|
9
|
+
export declare function isRedoShortcut(event: React.KeyboardEvent): boolean;
|
|
@@ -27,4 +27,10 @@ export function isPasteShortcut(event) {
|
|
|
27
27
|
// Checks if the keyboard event corresponds to the copy shortcut (CTRL+C or CMD+C) across different localization keyboards.
|
|
28
28
|
export function isCopyShortcut(event) {
|
|
29
29
|
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'C' && !event.shiftKey && !event.altKey;
|
|
30
|
+
}
|
|
31
|
+
export function isUndoShortcut(event) {
|
|
32
|
+
return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'Z' && !event.shiftKey && !event.altKey;
|
|
33
|
+
}
|
|
34
|
+
export function isRedoShortcut(event) {
|
|
35
|
+
return (event.ctrlKey || event.metaKey) && (String.fromCharCode(event.keyCode) === 'Z' && event.shiftKey || String.fromCharCode(event.keyCode) === 'Y' && !event.shiftKey) && !event.altKey;
|
|
30
36
|
}
|
|
@@ -15,7 +15,8 @@ const propsStateInitializer = (state, props) => {
|
|
|
15
15
|
listView: props.listView,
|
|
16
16
|
getRowId: props.getRowId,
|
|
17
17
|
isCellEditable: props.isCellEditable,
|
|
18
|
-
isRowSelectable: props.isRowSelectable
|
|
18
|
+
isRowSelectable: props.isRowSelectable,
|
|
19
|
+
dataSource: props.dataSource
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
22
|
};
|
|
@@ -32,9 +33,10 @@ const useGridProps = (apiRef, props) => {
|
|
|
32
33
|
listView: props.listView,
|
|
33
34
|
getRowId: props.getRowId,
|
|
34
35
|
isCellEditable: props.isCellEditable,
|
|
35
|
-
isRowSelectable: props.isRowSelectable
|
|
36
|
+
isRowSelectable: props.isRowSelectable,
|
|
37
|
+
dataSource: props.dataSource
|
|
36
38
|
}
|
|
37
39
|
}));
|
|
38
|
-
}, [apiRef, props.listView, props.getRowId, props.isCellEditable, props.isRowSelectable]);
|
|
40
|
+
}, [apiRef, props.listView, props.getRowId, props.isCellEditable, props.isRowSelectable, props.dataSource]);
|
|
39
41
|
};
|
|
40
42
|
exports.useGridProps = useGridProps;
|
|
@@ -18,6 +18,7 @@ var _useGridLogger = require("../../utils/useGridLogger");
|
|
|
18
18
|
var _useGridEvent = require("../../utils/useGridEvent");
|
|
19
19
|
var _keyboardUtils = require("../../../utils/keyboardUtils");
|
|
20
20
|
var _gridFocusStateSelector = require("./gridFocusStateSelector");
|
|
21
|
+
var _doesSupportPreventScroll = require("../../../utils/doesSupportPreventScroll");
|
|
21
22
|
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
22
23
|
var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
23
24
|
var _utils = require("../../../utils/utils");
|
|
@@ -58,6 +59,29 @@ const useGridFocus = (apiRef, props) => {
|
|
|
58
59
|
const setCellFocus = React.useCallback((id, field) => {
|
|
59
60
|
const focusedCell = (0, _gridFocusStateSelector.gridFocusCellSelector)(apiRef);
|
|
60
61
|
if (focusedCell?.id === id && focusedCell?.field === field) {
|
|
62
|
+
/**
|
|
63
|
+
* Check if the state matches the actual DOM focus. They can get out of sync after `updateRows()` remounts the cell.
|
|
64
|
+
*/
|
|
65
|
+
if (apiRef.current.getCellMode(id, field) !== 'view') {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const cellElement = apiRef.current.getCellElement(id, field);
|
|
69
|
+
if (!cellElement) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const doc = (0, _ownerDocument.default)(apiRef.current.rootElementRef.current);
|
|
73
|
+
if (cellElement.contains(doc.activeElement)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if ((0, _doesSupportPreventScroll.doesSupportPreventScroll)()) {
|
|
77
|
+
cellElement.focus({
|
|
78
|
+
preventScroll: true
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
const scrollPosition = apiRef.current.getScrollPosition();
|
|
82
|
+
cellElement.focus();
|
|
83
|
+
apiRef.current.scroll(scrollPosition);
|
|
84
|
+
}
|
|
61
85
|
return;
|
|
62
86
|
}
|
|
63
87
|
apiRef.current.setState(state => {
|
|
@@ -232,7 +256,7 @@ const useGridFocus = (apiRef, props) => {
|
|
|
232
256
|
apiRef.current.setCellFocus(id, field);
|
|
233
257
|
}, [apiRef]);
|
|
234
258
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
235
|
-
if (event.key === 'Enter' || event.key === 'Tab' || event.key === 'Shift' || (0, _keyboardUtils.isNavigationKey)(event.key)) {
|
|
259
|
+
if ((0, _keyboardUtils.isPasteShortcut)(event) || event.key === 'Enter' || event.key === 'Tab' || event.key === 'Shift' || (0, _keyboardUtils.isNavigationKey)(event.key)) {
|
|
236
260
|
return;
|
|
237
261
|
}
|
|
238
262
|
apiRef.current.setCellFocus(params.id, params.field);
|
|
@@ -62,7 +62,7 @@ const useGridScroll = (apiRef, props) => {
|
|
|
62
62
|
}
|
|
63
63
|
logger.debug(`Scrolling to cell at row ${params.rowIndex}, col: ${params.colIndex} `);
|
|
64
64
|
let scrollCoordinates = {};
|
|
65
|
-
if (params.colIndex !== undefined) {
|
|
65
|
+
if (params.colIndex !== undefined && visibleColumns[params.colIndex]) {
|
|
66
66
|
const columnPositions = (0, _gridColumnsSelector.gridColumnPositionsSelector)(apiRef);
|
|
67
67
|
let cellWidth;
|
|
68
68
|
if (typeof params.rowIndex !== 'undefined') {
|
|
@@ -79,7 +79,7 @@ const useGridScroll = (apiRef, props) => {
|
|
|
79
79
|
// When using RTL, `scrollLeft` becomes negative, so we must ensure that we only compare values.
|
|
80
80
|
scrollCoordinates.left = scrollIntoView({
|
|
81
81
|
containerSize: dimensions.viewportOuterSize.width,
|
|
82
|
-
scrollPosition: Math.abs(virtualScrollerRef.current
|
|
82
|
+
scrollPosition: Math.abs(virtualScrollerRef.current?.scrollLeft ?? 0),
|
|
83
83
|
elementSize: cellWidth,
|
|
84
84
|
elementOffset: columnPositions[params.colIndex]
|
|
85
85
|
});
|
|
@@ -92,7 +92,7 @@ const useGridScroll = (apiRef, props) => {
|
|
|
92
92
|
const targetOffsetHeight = rowsMeta.positions[elementIndex + 1] ? rowsMeta.positions[elementIndex + 1] - rowsMeta.positions[elementIndex] : rowsMeta.currentPageTotalHeight - rowsMeta.positions[elementIndex];
|
|
93
93
|
scrollCoordinates.top = scrollIntoView({
|
|
94
94
|
containerSize: dimensions.viewportInnerSize.height,
|
|
95
|
-
scrollPosition: virtualScrollerRef.current
|
|
95
|
+
scrollPosition: virtualScrollerRef.current?.scrollTop ?? 0,
|
|
96
96
|
elementSize: targetOffsetHeight,
|
|
97
97
|
elementOffset: rowsMeta.positions[elementIndex]
|
|
98
98
|
});
|