@mui/x-data-grid 8.5.3 → 8.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +210 -0
- package/components/cell/GridActionsCell.js +1 -9
- package/components/cell/GridActionsCellItem.d.ts +4 -1
- package/components/cell/GridActionsCellItem.js +1 -1
- package/components/cell/GridCell.js +1 -0
- package/components/cell/GridEditBooleanCell.js +1 -0
- package/components/cell/GridEditDateCell.js +1 -0
- package/components/cell/GridEditInputCell.js +1 -0
- package/components/cell/GridEditSingleSelectCell.js +1 -0
- package/components/columnHeaders/GridColumnGroupHeader.js +1 -0
- package/components/columnHeaders/GridColumnHeaderItem.js +1 -0
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -0
- package/components/columnSelection/GridCellCheckboxRenderer.js +1 -0
- package/components/columnSelection/GridHeaderCheckbox.js +1 -0
- package/components/columnsManagement/GridColumnsManagement.js +2 -2
- package/components/containers/GridRootStyles.js +0 -5
- package/components/menu/GridMenu.d.ts +1 -1
- package/components/menu/GridMenu.js +9 -1
- package/components/panel/GridPanel.js +1 -0
- package/components/panel/GridPanelContext.js +1 -0
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -0
- package/components/panel/filterPanel/GridFilterInputDate.js +1 -0
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -0
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -0
- package/components/panel/filterPanel/GridFilterPanel.js +1 -0
- package/components/quickFilter/QuickFilter.js +1 -0
- package/components/quickFilter/QuickFilterContext.js +1 -0
- package/components/toolbar/GridToolbarDensitySelector.js +1 -10
- package/components/toolbar/GridToolbarExportContainer.js +1 -10
- package/components/toolbarV8/GridToolbar.js +1 -0
- package/components/toolbarV8/Toolbar.js +1 -0
- package/components/toolbarV8/ToolbarButton.js +1 -0
- package/components/toolbarV8/ToolbarContext.js +1 -0
- package/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/esm/components/cell/GridActionsCell.js +2 -9
- package/esm/components/cell/GridActionsCellItem.d.ts +4 -1
- package/esm/components/cell/GridActionsCellItem.js +1 -1
- package/esm/components/cell/GridCell.js +2 -0
- package/esm/components/cell/GridEditBooleanCell.js +2 -0
- package/esm/components/cell/GridEditDateCell.js +2 -0
- package/esm/components/cell/GridEditInputCell.js +2 -0
- package/esm/components/cell/GridEditSingleSelectCell.js +2 -0
- package/esm/components/columnHeaders/GridColumnGroupHeader.js +2 -0
- package/esm/components/columnHeaders/GridColumnHeaderItem.js +2 -0
- package/esm/components/columnHeaders/GridColumnHeaderTitle.js +2 -0
- package/esm/components/columnHeaders/GridGenericColumnHeaderItem.js +2 -0
- package/esm/components/columnSelection/GridCellCheckboxRenderer.js +2 -0
- package/esm/components/columnSelection/GridHeaderCheckbox.js +2 -0
- package/esm/components/columnsManagement/GridColumnsManagement.js +3 -1
- package/esm/components/containers/GridRootStyles.js +0 -5
- package/esm/components/menu/GridMenu.d.ts +1 -1
- package/esm/components/menu/GridMenu.js +10 -1
- package/esm/components/panel/GridPanel.js +2 -0
- package/esm/components/panel/GridPanelContext.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterInputBoolean.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterInputDate.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterPanel.js +2 -0
- package/esm/components/quickFilter/QuickFilter.js +2 -0
- package/esm/components/quickFilter/QuickFilterContext.js +2 -0
- package/esm/components/toolbar/GridToolbarDensitySelector.js +2 -10
- package/esm/components/toolbar/GridToolbarExportContainer.js +2 -10
- package/esm/components/toolbarV8/GridToolbar.js +2 -0
- package/esm/components/toolbarV8/Toolbar.js +2 -0
- package/esm/components/toolbarV8/ToolbarButton.js +2 -0
- package/esm/components/toolbarV8/ToolbarContext.js +2 -0
- package/esm/components/virtualization/GridVirtualScrollbar.js +2 -0
- package/esm/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +2 -0
- package/esm/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +2 -0
- package/esm/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +2 -0
- package/esm/hooks/core/useGridApiInitialization.js +2 -0
- package/esm/hooks/core/useGridIsRtl.js +2 -0
- package/esm/hooks/core/useGridProps.js +2 -0
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +2 -0
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -0
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -0
- package/esm/hooks/features/columns/useGridColumns.js +23 -3
- package/esm/hooks/features/dataSource/useGridDataSource.js +2 -0
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +2 -0
- package/esm/hooks/features/density/useGridDensity.js +2 -0
- package/esm/hooks/features/dimensions/useGridDimensions.js +2 -0
- package/esm/hooks/features/editing/useGridCellEditing.js +2 -0
- package/esm/hooks/features/editing/useGridEditing.js +2 -0
- package/esm/hooks/features/editing/useGridRowEditing.js +2 -0
- package/esm/hooks/features/export/useGridPrintExport.js +2 -0
- package/esm/hooks/features/focus/useGridFocus.js +3 -1
- package/esm/hooks/features/headerFiltering/useGridHeaderFiltering.js +2 -0
- package/esm/hooks/features/listView/useGridListView.js +2 -0
- package/esm/hooks/features/pagination/useGridPaginationMeta.js +2 -0
- package/esm/hooks/features/pagination/useGridPaginationModel.js +2 -0
- package/esm/hooks/features/pagination/useGridRowCount.js +2 -0
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +2 -0
- package/esm/hooks/features/rows/useGridRowSpanning.js +2 -0
- package/esm/hooks/features/rows/useGridRows.js +2 -0
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +2 -0
- package/esm/hooks/features/virtualization/useGridVirtualization.js +2 -0
- package/esm/hooks/utils/useGridEvent.js +2 -0
- package/esm/hooks/utils/useGridPrivateApiContext.js +2 -0
- package/esm/hooks/utils/useGridSelector.js +2 -0
- package/esm/index.js +1 -1
- package/esm/internals/demo/TailwindDemoContainer.js +2 -0
- package/esm/locales/daDK.js +5 -5
- package/esm/locales/deDE.js +65 -73
- package/esm/models/params/gridScrollParams.d.ts +4 -0
- package/esm/utils/css/context.js +2 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -0
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +1 -0
- package/hooks/core/useGridApiInitialization.js +1 -0
- package/hooks/core/useGridIsRtl.js +1 -0
- package/hooks/core/useGridProps.js +1 -0
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +1 -0
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -0
- package/hooks/features/columnResize/useGridColumnResize.js +1 -0
- package/hooks/features/columns/useGridColumns.js +22 -3
- package/hooks/features/dataSource/useGridDataSource.js +1 -0
- package/hooks/features/dataSource/useGridDataSourceBase.js +1 -0
- package/hooks/features/density/useGridDensity.js +1 -0
- package/hooks/features/dimensions/useGridDimensions.js +1 -0
- package/hooks/features/editing/useGridCellEditing.js +1 -0
- package/hooks/features/editing/useGridEditing.js +1 -0
- package/hooks/features/editing/useGridRowEditing.js +1 -0
- package/hooks/features/export/useGridPrintExport.js +1 -0
- package/hooks/features/focus/useGridFocus.js +2 -1
- package/hooks/features/headerFiltering/useGridHeaderFiltering.js +1 -0
- package/hooks/features/listView/useGridListView.js +1 -0
- package/hooks/features/pagination/useGridPaginationMeta.js +1 -0
- package/hooks/features/pagination/useGridPaginationModel.js +1 -0
- package/hooks/features/pagination/useGridRowCount.js +1 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -0
- package/hooks/features/rows/useGridRowSpanning.js +1 -0
- package/hooks/features/rows/useGridRows.js +1 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +1 -0
- package/hooks/features/virtualization/useGridVirtualization.js +1 -0
- package/hooks/utils/useGridEvent.js +1 -0
- package/hooks/utils/useGridPrivateApiContext.js +1 -0
- package/hooks/utils/useGridSelector.js +1 -0
- package/index.js +1 -1
- package/internals/demo/TailwindDemoContainer.js +1 -0
- package/locales/daDK.js +5 -5
- package/locales/deDE.js +65 -73
- package/models/params/gridScrollParams.d.ts +4 -0
- package/package.json +2 -2
- package/utils/css/context.js +1 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { TimerBasedCleanupTracking } from "../../utils/cleanupTracking/TimerBasedCleanupTracking.js";
|
|
3
5
|
import { FinalizationRegistryBasedCleanupTracking } from "../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js";
|
package/esm/index.js
CHANGED
package/esm/locales/daDK.js
CHANGED
|
@@ -41,7 +41,7 @@ const daDKGrid = {
|
|
|
41
41
|
// Columns management text
|
|
42
42
|
columnsManagementSearchTitle: 'Søg',
|
|
43
43
|
columnsManagementNoColumns: 'Ingen søjler',
|
|
44
|
-
columnsManagementShowHideAllText: 'Vis/Skjul
|
|
44
|
+
columnsManagementShowHideAllText: 'Vis/Skjul alle',
|
|
45
45
|
columnsManagementReset: 'Nulstil',
|
|
46
46
|
// columnsManagementDeleteIconLabel: 'Clear',
|
|
47
47
|
|
|
@@ -110,12 +110,12 @@ const daDKGrid = {
|
|
|
110
110
|
columnMenuLabel: 'Menu',
|
|
111
111
|
// columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
|
|
112
112
|
columnMenuShowColumns: 'Vis kolonner',
|
|
113
|
-
columnMenuManageColumns: '
|
|
114
|
-
columnMenuFilter: '
|
|
113
|
+
columnMenuManageColumns: 'Administrér kolonner',
|
|
114
|
+
columnMenuFilter: 'Filtrér',
|
|
115
115
|
columnMenuHideColumn: 'Skjul kolonne',
|
|
116
116
|
columnMenuUnsort: 'Fjern sortering',
|
|
117
|
-
columnMenuSortAsc: '
|
|
118
|
-
columnMenuSortDesc: '
|
|
117
|
+
columnMenuSortAsc: 'Sortér stigende',
|
|
118
|
+
columnMenuSortDesc: 'Sortér faldende',
|
|
119
119
|
// columnMenuManagePivot: 'Manage pivot',
|
|
120
120
|
|
|
121
121
|
// Column header text
|
package/esm/locales/deDE.js
CHANGED
|
@@ -5,8 +5,7 @@ const deDEGrid = {
|
|
|
5
5
|
noResultsOverlayLabel: 'Keine Ergebnisse gefunden.',
|
|
6
6
|
noColumnsOverlayLabel: 'Keine Spalten',
|
|
7
7
|
noColumnsOverlayManageColumns: 'Spalten verwalten',
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
emptyPivotOverlayLabel: 'Felder zu Zeilen, Spalten und Werten hinzufügen, um eine Pivot-Tabelle zu erstellen',
|
|
10
9
|
// Density selector toolbar button text
|
|
11
10
|
toolbarDensity: 'Zeilenhöhe',
|
|
12
11
|
toolbarDensityLabel: 'Zeilenhöhe',
|
|
@@ -33,11 +32,9 @@ const deDEGrid = {
|
|
|
33
32
|
toolbarExportPrint: 'Drucken',
|
|
34
33
|
toolbarExportExcel: 'Download als Excel',
|
|
35
34
|
// Toolbar pivot button
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
toolbarPivot: 'Pivot',
|
|
38
36
|
// Toolbar AI Assistant button
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
toolbarAssistant: 'KI-Assistent',
|
|
41
38
|
// Columns management text
|
|
42
39
|
columnsManagementSearchTitle: 'Suche',
|
|
43
40
|
columnsManagementNoColumns: 'Keine Spalten',
|
|
@@ -114,8 +111,7 @@ const deDEGrid = {
|
|
|
114
111
|
columnMenuUnsort: 'Sortierung deaktivieren',
|
|
115
112
|
columnMenuSortAsc: 'Sortiere aufsteigend',
|
|
116
113
|
columnMenuSortDesc: 'Sortiere absteigend',
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
columnMenuManagePivot: 'Pivot verwalten',
|
|
119
115
|
// Column header text
|
|
120
116
|
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} aktive Filter` : `${count} aktiver Filter`,
|
|
121
117
|
columnHeaderFiltersLabel: 'Zeige Filter',
|
|
@@ -190,80 +186,76 @@ const deDEGrid = {
|
|
|
190
186
|
aggregationFunctionLabelMax: 'Maximum',
|
|
191
187
|
aggregationFunctionLabelSize: 'Anzahl',
|
|
192
188
|
// Pivot panel
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
189
|
+
pivotToggleLabel: 'Pivot',
|
|
190
|
+
pivotRows: 'Zeilen',
|
|
191
|
+
pivotColumns: 'Spalten',
|
|
192
|
+
pivotValues: 'Werte',
|
|
193
|
+
pivotCloseButton: 'Pivot-Einstellungen schließen',
|
|
194
|
+
pivotSearchButton: 'Felder suchen',
|
|
195
|
+
pivotSearchControlPlaceholder: 'Felder suchen',
|
|
196
|
+
pivotSearchControlLabel: 'Felder suchen',
|
|
197
|
+
pivotSearchControlClear: 'Suche löschen',
|
|
198
|
+
pivotNoFields: 'Keine Felder',
|
|
199
|
+
pivotMenuMoveUp: 'Nach oben',
|
|
200
|
+
pivotMenuMoveDown: 'Nach unten',
|
|
201
|
+
pivotMenuMoveToTop: 'An den Anfang',
|
|
202
|
+
pivotMenuMoveToBottom: 'An das Ende',
|
|
203
|
+
pivotMenuRows: 'Zeilen',
|
|
204
|
+
pivotMenuColumns: 'Spalten',
|
|
205
|
+
pivotMenuValues: 'Werte',
|
|
206
|
+
pivotMenuOptions: 'Feldoptionen',
|
|
207
|
+
pivotMenuAddToRows: 'Zu Zeilen hinzufügen',
|
|
208
|
+
pivotMenuAddToColumns: 'Zu Spalten hinzufügen',
|
|
209
|
+
pivotMenuAddToValues: 'Zu Werten hinzufügen',
|
|
210
|
+
pivotMenuRemove: 'Entfernen',
|
|
211
|
+
pivotDragToRows: 'Hier hinziehen, um Zeilen zu erstellen',
|
|
212
|
+
pivotDragToColumns: 'Hier hinziehen, um Spalten zu erstellen',
|
|
213
|
+
pivotDragToValues: 'Hier hinziehen, um Werte zu erstellen',
|
|
214
|
+
pivotYearColumnHeaderName: '(Jahr)',
|
|
215
|
+
pivotQuarterColumnHeaderName: '(Quartal)',
|
|
221
216
|
// AI Assistant panel
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
217
|
+
aiAssistantPanelTitle: 'KI-Assistent',
|
|
218
|
+
aiAssistantPanelClose: 'KI-Assistent schließen',
|
|
219
|
+
aiAssistantPanelNewConversation: 'Neue Unterhaltung',
|
|
220
|
+
aiAssistantPanelConversationHistory: 'Unterhaltungsverlauf',
|
|
221
|
+
aiAssistantPanelEmptyConversation: 'Kein Prompt-Verlauf',
|
|
222
|
+
aiAssistantSuggestions: 'Vorschläge',
|
|
229
223
|
// Prompt field
|
|
230
224
|
promptFieldLabel: 'Prompteingabe',
|
|
231
225
|
promptFieldPlaceholder: 'Prompt eingeben…',
|
|
232
226
|
promptFieldPlaceholderWithRecording: 'Prompt eingeben oder aufnehmen…',
|
|
233
227
|
promptFieldPlaceholderListening: 'Hört Prompteingabe zu…',
|
|
234
|
-
|
|
228
|
+
promptFieldSpeechRecognitionNotSupported: 'Spracherkennung wird in diesem Browser nicht unterstützt',
|
|
235
229
|
promptFieldSend: 'Senden',
|
|
236
230
|
promptFieldRecord: 'Aufnahme starten',
|
|
237
|
-
promptFieldStopRecording: 'Aufnahme stoppen'
|
|
238
|
-
|
|
231
|
+
promptFieldStopRecording: 'Aufnahme stoppen',
|
|
239
232
|
// Prompt
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
233
|
+
promptRerun: 'Erneut ausführen',
|
|
234
|
+
promptProcessing: 'Verarbeitung…',
|
|
235
|
+
promptAppliedChanges: 'Änderungen angewendet',
|
|
244
236
|
// Prompt changes
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
237
|
+
promptChangeGroupDescription: column => `Gruppieren nach ${column}`,
|
|
238
|
+
promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
|
|
239
|
+
promptChangeAggregationDescription: (column, aggregation) => `${column} aggregieren (${aggregation})`,
|
|
240
|
+
promptChangeFilterLabel: (column, operator, value) => {
|
|
241
|
+
if (operator === 'is any of') {
|
|
242
|
+
return `${column} entspricht einem der Werte: ${value}`;
|
|
243
|
+
}
|
|
244
|
+
return `${column} ${operator} ${value}`;
|
|
245
|
+
},
|
|
246
|
+
promptChangeFilterDescription: (column, operator, value) => {
|
|
247
|
+
if (operator === 'is any of') {
|
|
248
|
+
return `Filtern, bei dem ${column} einem der folgenden Werte entspricht: ${value}`;
|
|
249
|
+
}
|
|
250
|
+
return `Filtern wo ${column} ${operator} ${value}`;
|
|
251
|
+
},
|
|
252
|
+
promptChangeSortDescription: (column, direction) => `Sortieren nach ${column} (${direction})`,
|
|
253
|
+
promptChangePivotEnableLabel: 'Pivot',
|
|
254
|
+
promptChangePivotEnableDescription: 'Pivot aktivieren',
|
|
255
|
+
promptChangePivotColumnsLabel: count => `Spalten (${count})`,
|
|
256
|
+
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
|
|
257
|
+
promptChangePivotRowsLabel: count => `Zeilen (${count})`,
|
|
258
|
+
promptChangePivotValuesLabel: count => `Werte (${count})`,
|
|
259
|
+
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
|
|
268
260
|
};
|
|
269
261
|
export const deDE = getGridLocalization(deDEGrid);
|
|
@@ -2,6 +2,10 @@ export interface GridColumnsRenderContext {
|
|
|
2
2
|
firstColumnIndex: number;
|
|
3
3
|
lastColumnIndex: number;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Provides the current render context range for rows and columns.
|
|
7
|
+
* End index is exclusive - [firstRowIndex, lastRowIndex) and [firstColumnIndex, lastColumnIndex)
|
|
8
|
+
*/
|
|
5
9
|
export interface GridRenderContext extends GridColumnsRenderContext {
|
|
6
10
|
firstRowIndex: number;
|
|
7
11
|
lastRowIndex: number;
|
package/esm/utils/css/context.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
'use client';
|
|
2
3
|
|
|
3
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
@@ -215,9 +216,9 @@ function useGridColumns(apiRef, props) {
|
|
|
215
216
|
});
|
|
216
217
|
}, [apiRef, props.columnVisibilityModel, props.initialState?.columns]);
|
|
217
218
|
const stateRestorePreProcessing = React.useCallback((params, context) => {
|
|
218
|
-
const columnVisibilityModelToImport = context.stateToRestore.columns?.columnVisibilityModel;
|
|
219
219
|
const initialState = context.stateToRestore.columns;
|
|
220
|
-
|
|
220
|
+
const columnVisibilityModelToImport = initialState?.columnVisibilityModel;
|
|
221
|
+
if (initialState == null) {
|
|
221
222
|
return params;
|
|
222
223
|
}
|
|
223
224
|
const columnsState = (0, _gridColumnsUtils.createColumnsState)({
|
|
@@ -227,7 +228,25 @@ function useGridColumns(apiRef, props) {
|
|
|
227
228
|
columnVisibilityModel: columnVisibilityModelToImport,
|
|
228
229
|
keepOnlyColumnsToUpsert: false
|
|
229
230
|
});
|
|
230
|
-
|
|
231
|
+
if (initialState != null) {
|
|
232
|
+
apiRef.current.setState(prevState => (0, _extends2.default)({}, prevState, {
|
|
233
|
+
columns: (0, _extends2.default)({}, prevState.columns, {
|
|
234
|
+
lookup: columnsState.lookup,
|
|
235
|
+
orderedFields: columnsState.orderedFields,
|
|
236
|
+
initialColumnVisibilityModel: columnsState.initialColumnVisibilityModel
|
|
237
|
+
})
|
|
238
|
+
}));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// separate column visibility model state update as it can be controlled
|
|
242
|
+
// https://github.com/mui/mui-x/issues/17681#issuecomment-3012528602
|
|
243
|
+
if (columnVisibilityModelToImport != null) {
|
|
244
|
+
apiRef.current.setState(prevState => (0, _extends2.default)({}, prevState, {
|
|
245
|
+
columns: (0, _extends2.default)({}, prevState.columns, {
|
|
246
|
+
columnVisibilityModel: columnVisibilityModelToImport
|
|
247
|
+
})
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
231
250
|
if (initialState != null) {
|
|
232
251
|
apiRef.current.publishEvent('columnsChange', columnsState.orderedFields);
|
|
233
252
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
'use client';
|
|
2
3
|
|
|
3
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
@@ -366,7 +367,7 @@ const useGridFocus = (apiRef, props) => {
|
|
|
366
367
|
paginationMode: props.paginationMode
|
|
367
368
|
});
|
|
368
369
|
const rowIsInCurrentPage = currentPage.rows.find(row => row.id === currentFocusedCell.id);
|
|
369
|
-
if (rowIsInCurrentPage) {
|
|
370
|
+
if (rowIsInCurrentPage || currentPage.rows.length === 0) {
|
|
370
371
|
return;
|
|
371
372
|
}
|
|
372
373
|
const visibleColumns = (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef);
|
package/index.js
CHANGED
package/locales/daDK.js
CHANGED
|
@@ -47,7 +47,7 @@ const daDKGrid = {
|
|
|
47
47
|
// Columns management text
|
|
48
48
|
columnsManagementSearchTitle: 'Søg',
|
|
49
49
|
columnsManagementNoColumns: 'Ingen søjler',
|
|
50
|
-
columnsManagementShowHideAllText: 'Vis/Skjul
|
|
50
|
+
columnsManagementShowHideAllText: 'Vis/Skjul alle',
|
|
51
51
|
columnsManagementReset: 'Nulstil',
|
|
52
52
|
// columnsManagementDeleteIconLabel: 'Clear',
|
|
53
53
|
|
|
@@ -116,12 +116,12 @@ const daDKGrid = {
|
|
|
116
116
|
columnMenuLabel: 'Menu',
|
|
117
117
|
// columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
|
|
118
118
|
columnMenuShowColumns: 'Vis kolonner',
|
|
119
|
-
columnMenuManageColumns: '
|
|
120
|
-
columnMenuFilter: '
|
|
119
|
+
columnMenuManageColumns: 'Administrér kolonner',
|
|
120
|
+
columnMenuFilter: 'Filtrér',
|
|
121
121
|
columnMenuHideColumn: 'Skjul kolonne',
|
|
122
122
|
columnMenuUnsort: 'Fjern sortering',
|
|
123
|
-
columnMenuSortAsc: '
|
|
124
|
-
columnMenuSortDesc: '
|
|
123
|
+
columnMenuSortAsc: 'Sortér stigende',
|
|
124
|
+
columnMenuSortDesc: 'Sortér faldende',
|
|
125
125
|
// columnMenuManagePivot: 'Manage pivot',
|
|
126
126
|
|
|
127
127
|
// Column header text
|