@mui/x-data-grid 6.13.0 → 6.15.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 +162 -1
- package/DataGrid/useDataGridComponent.js +43 -40
- package/README.md +3 -7
- package/components/DataGridVirtualScroller.d.ts +1 -4
- package/components/DataGridVirtualScroller.js +3 -5
- package/components/GridColumnHeaders.js +2 -3
- package/components/GridPagination.d.ts +2 -44
- package/components/GridRow.js +4 -2
- package/components/base/GridBody.d.ts +0 -1
- package/components/base/GridBody.js +2 -22
- package/components/cell/GridActionsCell.js +2 -2
- package/components/cell/GridActionsCellItem.d.ts +10 -54
- package/components/cell/GridCell.js +4 -2
- package/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/components/menu/GridMenu.d.ts +1 -2
- package/components/menu/GridMenu.js +21 -5
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +11 -8
- package/components/panel/GridPanelWrapper.js +2 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +3 -5
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +2 -7
- package/components/toolbar/GridToolbarExportContainer.js +1 -9
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -2
- package/hooks/features/export/useGridPrintExport.js +37 -7
- package/hooks/features/filter/gridFilterUtils.js +10 -6
- package/hooks/features/focus/useGridFocus.js +0 -1
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +2 -1
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +16 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.js +18 -0
- package/hooks/features/virtualization/index.d.ts +2 -0
- package/hooks/features/virtualization/index.js +2 -0
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +53 -36
- package/hooks/features/virtualization/useGridVirtualization.d.ts +12 -0
- package/hooks/features/virtualization/useGridVirtualization.js +47 -0
- package/index.js +1 -1
- package/internals/index.d.ts +4 -0
- package/internals/index.js +4 -0
- package/legacy/DataGrid/useDataGridComponent.js +43 -40
- package/legacy/components/DataGridVirtualScroller.js +2 -4
- package/legacy/components/GridColumnHeaders.js +2 -3
- package/legacy/components/GridRow.js +4 -2
- package/legacy/components/base/GridBody.js +2 -26
- package/legacy/components/cell/GridActionsCell.js +2 -2
- package/legacy/components/cell/GridCell.js +4 -2
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/legacy/components/menu/GridMenu.js +21 -5
- package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +11 -8
- package/legacy/components/panel/GridPanelWrapper.js +2 -2
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +4 -5
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -1
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +2 -7
- package/legacy/components/toolbar/GridToolbarExportContainer.js +1 -9
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -2
- package/legacy/hooks/features/export/useGridPrintExport.js +44 -12
- package/legacy/hooks/features/filter/gridFilterUtils.js +10 -6
- package/legacy/hooks/features/focus/useGridFocus.js +0 -1
- package/legacy/hooks/features/index.js +2 -1
- package/legacy/hooks/features/virtualization/gridVirtualizationSelectors.js +24 -0
- package/legacy/hooks/features/virtualization/index.js +2 -0
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +61 -39
- package/legacy/hooks/features/virtualization/useGridVirtualization.js +51 -0
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +4 -0
- package/legacy/locales/faIR.js +25 -27
- package/legacy/locales/jaJP.js +25 -27
- package/legacy/locales/viVN.js +35 -39
- package/legacy/models/api/index.js +1 -2
- package/legacy/utils/createControllablePromise.js +11 -0
- package/locales/faIR.js +25 -27
- package/locales/jaJP.js +25 -27
- package/locales/viVN.js +35 -39
- package/models/api/gridApiCommon.d.ts +3 -4
- package/models/api/gridVirtualizationApi.d.ts +20 -0
- package/models/api/index.d.ts +1 -2
- package/models/api/index.js +1 -2
- package/models/events/gridEventLookup.d.ts +8 -0
- package/models/gridExport.d.ts +17 -4
- package/models/gridStateCommunity.d.ts +2 -1
- package/models/index.d.ts +1 -1
- package/modern/DataGrid/useDataGridComponent.js +43 -40
- package/modern/components/DataGridVirtualScroller.js +3 -5
- package/modern/components/GridColumnHeaders.js +2 -3
- package/modern/components/GridRow.js +4 -2
- package/modern/components/base/GridBody.js +2 -22
- package/modern/components/cell/GridActionsCell.js +2 -2
- package/modern/components/cell/GridCell.js +4 -2
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/modern/components/menu/GridMenu.js +20 -5
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +11 -8
- package/modern/components/panel/GridPanelWrapper.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +3 -5
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/modern/components/toolbar/GridToolbarDensitySelector.js +2 -7
- package/modern/components/toolbar/GridToolbarExportContainer.js +1 -9
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -2
- package/modern/hooks/features/export/useGridPrintExport.js +37 -7
- package/modern/hooks/features/filter/gridFilterUtils.js +10 -6
- package/modern/hooks/features/focus/useGridFocus.js +0 -1
- package/modern/hooks/features/index.js +2 -1
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.js +18 -0
- package/modern/hooks/features/virtualization/index.js +2 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +52 -36
- package/modern/hooks/features/virtualization/useGridVirtualization.js +47 -0
- package/modern/index.js +1 -1
- package/modern/internals/index.js +4 -0
- package/modern/locales/faIR.js +25 -27
- package/modern/locales/jaJP.js +25 -27
- package/modern/locales/viVN.js +35 -39
- package/modern/models/api/index.js +1 -2
- package/modern/utils/createControllablePromise.js +11 -0
- package/node/DataGrid/useDataGridComponent.js +43 -40
- package/node/components/DataGridVirtualScroller.js +3 -5
- package/node/components/GridColumnHeaders.js +2 -3
- package/node/components/GridRow.js +4 -2
- package/node/components/base/GridBody.js +2 -22
- package/node/components/cell/GridActionsCell.js +2 -2
- package/node/components/cell/GridCell.js +4 -2
- package/node/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/node/components/menu/GridMenu.js +19 -4
- package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +10 -7
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +2 -4
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/node/components/toolbar/GridToolbarDensitySelector.js +2 -7
- package/node/components/toolbar/GridToolbarExportContainer.js +1 -9
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -2
- package/node/hooks/features/export/useGridPrintExport.js +37 -7
- package/node/hooks/features/filter/gridFilterUtils.js +9 -6
- package/node/hooks/features/focus/useGridFocus.js +0 -1
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +27 -0
- package/node/hooks/features/virtualization/index.js +27 -0
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +51 -37
- package/node/hooks/features/virtualization/useGridVirtualization.js +58 -0
- package/node/index.js +1 -1
- package/node/internals/index.js +44 -0
- package/node/locales/faIR.js +25 -27
- package/node/locales/jaJP.js +25 -27
- package/node/locales/viVN.js +35 -39
- package/node/models/api/index.js +4 -15
- package/node/utils/createControllablePromise.js +17 -0
- package/package.json +2 -2
- package/utils/createControllablePromise.d.ts +5 -0
- package/utils/createControllablePromise.js +11 -0
- package/models/api/gridDisableVirtualizationApi.d.ts +0 -15
- package/models/api/gridVirtualScrollerApi.d.ts +0 -8
- package/models/api/gridVirtualScrollerApi.js +0 -1
- package/modern/models/api/gridDisableVirtualizationApi.js +0 -1
- package/modern/models/api/gridVirtualScrollerApi.js +0 -1
- package/node/models/api/gridVirtualScrollerApi.js +0 -5
- /package/legacy/models/api/{gridDisableVirtualizationApi.js → gridVirtualizationApi.js} +0 -0
- /package/{legacy/models/api/gridVirtualScrollerApi.js → models/api/gridVirtualizationApi.js} +0 -0
- /package/{models/api/gridDisableVirtualizationApi.js → modern/models/api/gridVirtualizationApi.js} +0 -0
- /package/node/models/api/{gridDisableVirtualizationApi.js → gridVirtualizationApi.js} +0 -0
package/locales/jaJP.js
CHANGED
|
@@ -60,34 +60,32 @@ const jaJPGrid = {
|
|
|
60
60
|
filterOperatorIsEmpty: '...空である',
|
|
61
61
|
filterOperatorIsNotEmpty: '...空でない',
|
|
62
62
|
filterOperatorIsAnyOf: '...のいずれか',
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
'filterOperator=': '=',
|
|
64
|
+
'filterOperator!=': '!=',
|
|
65
|
+
'filterOperator>': '>',
|
|
66
|
+
'filterOperator>=': '>=',
|
|
67
|
+
'filterOperator<': '<',
|
|
68
|
+
'filterOperator<=': '<=',
|
|
70
69
|
// Header filter operators text
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
70
|
+
headerFilterOperatorContains: '含む',
|
|
71
|
+
headerFilterOperatorEquals: '等しい',
|
|
72
|
+
headerFilterOperatorStartsWith: 'で始まる',
|
|
73
|
+
headerFilterOperatorEndsWith: 'で終わる',
|
|
74
|
+
headerFilterOperatorIs: 'である',
|
|
75
|
+
headerFilterOperatorNot: 'ではない',
|
|
76
|
+
headerFilterOperatorAfter: '...より後ろ',
|
|
77
|
+
headerFilterOperatorOnOrAfter: '...以降',
|
|
78
|
+
headerFilterOperatorBefore: '...より前',
|
|
79
|
+
headerFilterOperatorOnOrBefore: '...以前',
|
|
80
|
+
headerFilterOperatorIsEmpty: '空白',
|
|
81
|
+
headerFilterOperatorIsNotEmpty: '空白ではない',
|
|
82
|
+
headerFilterOperatorIsAnyOf: 'いずれか',
|
|
83
|
+
'headerFilterOperator=': '等しい',
|
|
84
|
+
'headerFilterOperator!=': '等しくない',
|
|
85
|
+
'headerFilterOperator>': 'より大きい',
|
|
86
|
+
'headerFilterOperator>=': '以上',
|
|
87
|
+
'headerFilterOperator<': '未満',
|
|
88
|
+
'headerFilterOperator<=': '以下',
|
|
91
89
|
// Filter values text
|
|
92
90
|
filterValueAny: 'いずれか',
|
|
93
91
|
filterValueTrue: '真',
|
package/locales/viVN.js
CHANGED
|
@@ -37,7 +37,7 @@ const viVNGrid = {
|
|
|
37
37
|
columnsPanelHideAllButton: 'Ẩn tất cả',
|
|
38
38
|
// Filter panel text
|
|
39
39
|
filterPanelAddFilter: 'Thêm bộ lọc',
|
|
40
|
-
|
|
40
|
+
filterPanelRemoveAll: 'Xóa tất cả',
|
|
41
41
|
filterPanelDeleteIconLabel: 'Xóa',
|
|
42
42
|
filterPanelLogicOperator: 'Toán tử logic',
|
|
43
43
|
filterPanelOperator: 'Toán tử',
|
|
@@ -59,35 +59,33 @@ const viVNGrid = {
|
|
|
59
59
|
filterOperatorOnOrBefore: 'bằng hoặc trước',
|
|
60
60
|
filterOperatorIsEmpty: 'Rỗng',
|
|
61
61
|
filterOperatorIsNotEmpty: 'Khác rỗng',
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
filterOperatorIsAnyOf: 'Bất kỳ',
|
|
63
|
+
'filterOperator=': '=',
|
|
64
|
+
'filterOperator!=': '!=',
|
|
65
|
+
'filterOperator>': '>',
|
|
66
|
+
'filterOperator>=': '>=',
|
|
67
|
+
'filterOperator<': '<',
|
|
68
|
+
'filterOperator<=': '<=',
|
|
70
69
|
// Header filter operators text
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
70
|
+
headerFilterOperatorContains: 'Chứa',
|
|
71
|
+
headerFilterOperatorEquals: 'Bằng',
|
|
72
|
+
headerFilterOperatorStartsWith: 'Bắt đầu với',
|
|
73
|
+
headerFilterOperatorEndsWith: 'Kết thúc với',
|
|
74
|
+
headerFilterOperatorIs: 'là',
|
|
75
|
+
headerFilterOperatorNot: 'Không là',
|
|
76
|
+
headerFilterOperatorAfter: 'Sau',
|
|
77
|
+
headerFilterOperatorOnOrAfter: 'Đang hoặc sau',
|
|
78
|
+
headerFilterOperatorBefore: 'Trước',
|
|
79
|
+
headerFilterOperatorOnOrBefore: 'Đang hoặc trước',
|
|
80
|
+
headerFilterOperatorIsEmpty: 'Rỗng',
|
|
81
|
+
headerFilterOperatorIsNotEmpty: 'Khác rỗng',
|
|
82
|
+
headerFilterOperatorIsAnyOf: 'Bất kỳ',
|
|
83
|
+
'headerFilterOperator=': 'Bằng',
|
|
84
|
+
'headerFilterOperator!=': 'Khác',
|
|
85
|
+
'headerFilterOperator>': 'Lớn hơn',
|
|
86
|
+
'headerFilterOperator>=': 'Lớn hơn hoặc bằng',
|
|
87
|
+
'headerFilterOperator<': 'Nhỏ hơn',
|
|
88
|
+
'headerFilterOperator<=': 'Nhỏ hơn hoặc bằng',
|
|
91
89
|
// Filter values text
|
|
92
90
|
filterValueAny: 'bất kỳ giá trị nào',
|
|
93
91
|
filterValueTrue: 'Có',
|
|
@@ -95,7 +93,7 @@ const viVNGrid = {
|
|
|
95
93
|
// Column menu text
|
|
96
94
|
columnMenuLabel: 'Danh mục',
|
|
97
95
|
columnMenuShowColumns: 'Danh sách cột',
|
|
98
|
-
|
|
96
|
+
columnMenuManageColumns: 'Quản lý cột',
|
|
99
97
|
columnMenuFilter: 'Bộ lọc',
|
|
100
98
|
columnMenuHideColumn: 'Ẩn cột',
|
|
101
99
|
columnMenuUnsort: 'Bỏ sắp xếp',
|
|
@@ -139,15 +137,13 @@ const viVNGrid = {
|
|
|
139
137
|
expandDetailPanel: 'Mở rộng',
|
|
140
138
|
collapseDetailPanel: 'Thu nhỏ',
|
|
141
139
|
// Row reordering text
|
|
142
|
-
rowReorderingHeaderName: 'Sắp xếp hàng'
|
|
143
|
-
|
|
140
|
+
rowReorderingHeaderName: 'Sắp xếp hàng',
|
|
144
141
|
// Aggregation
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
142
|
+
aggregationMenuItemHeader: 'Tổng hợp',
|
|
143
|
+
aggregationFunctionLabelSum: 'Tổng',
|
|
144
|
+
aggregationFunctionLabelAvg: 'Trung bình',
|
|
145
|
+
aggregationFunctionLabelMin: 'Tối thiểu',
|
|
146
|
+
aggregationFunctionLabelMax: 'Tối đa',
|
|
147
|
+
aggregationFunctionLabelSize: 'Kích cỡ'
|
|
151
148
|
};
|
|
152
|
-
|
|
153
149
|
export const viVN = getGridLocalization(viVNGrid, viVNCore);
|
|
@@ -10,7 +10,6 @@ import { GridLocaleTextApi } from './gridLocaleTextApi';
|
|
|
10
10
|
import type { GridParamsApi } from './gridParamsApi';
|
|
11
11
|
import { GridPreferencesPanelApi } from './gridPreferencesPanelApi';
|
|
12
12
|
import { GridPrintExportApi } from './gridPrintExportApi';
|
|
13
|
-
import { GridDisableVirtualizationApi } from './gridDisableVirtualizationApi';
|
|
14
13
|
import { GridRowApi } from './gridRowApi';
|
|
15
14
|
import { GridRowsMetaApi, GridRowsMetaPrivateApi } from './gridRowsMetaApi';
|
|
16
15
|
import { GridRowSelectionApi } from './gridRowSelectionApi';
|
|
@@ -18,7 +17,7 @@ import { GridSortApi } from './gridSortApi';
|
|
|
18
17
|
import { GridStateApi, GridStatePrivateApi } from './gridStateApi';
|
|
19
18
|
import { GridLoggerApi } from './gridLoggerApi';
|
|
20
19
|
import { GridScrollApi } from './gridScrollApi';
|
|
21
|
-
import {
|
|
20
|
+
import { GridVirtualizationApi, GridVirtualizationPrivateApi } from './gridVirtualizationApi';
|
|
22
21
|
import type { GridPipeProcessingApi, GridPipeProcessingPrivateApi } from '../../hooks/core/pipeProcessing';
|
|
23
22
|
import { GridColumnSpanningApi, GridColumnSpanningPrivateApi } from './gridColumnSpanning';
|
|
24
23
|
import type { GridStrategyProcessingApi } from '../../hooks/core/strategyProcessing';
|
|
@@ -28,9 +27,9 @@ import type { GridStatePersistenceApi } from '../../hooks/features/statePersiste
|
|
|
28
27
|
import { GridColumnGroupingApi } from './gridColumnGroupingApi';
|
|
29
28
|
import type { GridInitialStateCommunity, GridStateCommunity } from '../gridStateCommunity';
|
|
30
29
|
import { GridHeaderFilteringApi, GridHeaderFilteringPrivateApi } from './gridHeaderFilteringApi';
|
|
31
|
-
export interface GridApiCommon<GridState extends GridStateCommunity = any, GridInitialState extends GridInitialStateCommunity = any> extends GridCoreApi, GridPipeProcessingApi, GridDensityApi, GridDimensionsApi, GridRowApi, GridRowsMetaApi, GridEditingApi, GridParamsApi, GridColumnApi, GridRowSelectionApi, GridSortApi, GridPaginationApi, GridCsvExportApi, GridFocusApi, GridFilterApi, GridColumnMenuApi, GridPreferencesPanelApi, GridPrintExportApi,
|
|
30
|
+
export interface GridApiCommon<GridState extends GridStateCommunity = any, GridInitialState extends GridInitialStateCommunity = any> extends GridCoreApi, GridPipeProcessingApi, GridDensityApi, GridDimensionsApi, GridRowApi, GridRowsMetaApi, GridEditingApi, GridParamsApi, GridColumnApi, GridRowSelectionApi, GridSortApi, GridPaginationApi, GridCsvExportApi, GridFocusApi, GridFilterApi, GridColumnMenuApi, GridPreferencesPanelApi, GridPrintExportApi, GridVirtualizationApi, GridLocaleTextApi, GridScrollApi, GridColumnSpanningApi, GridStateApi<GridState>, GridStatePersistenceApi<GridInitialState>, GridColumnGroupingApi, GridHeaderFilteringApi {
|
|
32
31
|
}
|
|
33
|
-
export interface GridPrivateOnlyApiCommon<Api extends GridApiCommon, PrivateApi extends GridPrivateApiCommon> extends GridCorePrivateApi<Api, PrivateApi>, GridStatePrivateApi<PrivateApi['state']>, GridPipeProcessingPrivateApi, GridStrategyProcessingApi, GridColumnSpanningPrivateApi, GridRowsMetaPrivateApi, GridDimensionsPrivateApi,
|
|
32
|
+
export interface GridPrivateOnlyApiCommon<Api extends GridApiCommon, PrivateApi extends GridPrivateApiCommon> extends GridCorePrivateApi<Api, PrivateApi>, GridStatePrivateApi<PrivateApi['state']>, GridPipeProcessingPrivateApi, GridStrategyProcessingApi, GridColumnSpanningPrivateApi, GridRowsMetaPrivateApi, GridDimensionsPrivateApi, GridEditingPrivateApi, GridLoggerApi, GridFocusPrivateApi, GridHeaderFilteringPrivateApi, GridVirtualizationPrivateApi {
|
|
34
33
|
}
|
|
35
34
|
export interface GridPrivateApiCommon extends GridApiCommon, GridPrivateOnlyApiCommon<GridApiCommon, GridPrivateApiCommon> {
|
|
36
35
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GridRenderContext } from '../params';
|
|
2
|
+
export interface GridVirtualizationApi {
|
|
3
|
+
/**
|
|
4
|
+
* Enable/disable virtualization.
|
|
5
|
+
* @param {boolean} enabled The enabled value for virtualization
|
|
6
|
+
*/
|
|
7
|
+
unstable_setVirtualization: (enabled: boolean) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Enable/disable column virtualization.
|
|
10
|
+
* @param {boolean} enabled The enabled value for column virtualization
|
|
11
|
+
*/
|
|
12
|
+
unstable_setColumnVirtualization: (enabled: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface GridVirtualizationPrivateApi {
|
|
15
|
+
/**
|
|
16
|
+
* Get the current grid rendering context.
|
|
17
|
+
* @returns {GridRenderContext} The `GridRenderContext`.
|
|
18
|
+
*/
|
|
19
|
+
getRenderContext: () => GridRenderContext;
|
|
20
|
+
}
|
package/models/api/index.d.ts
CHANGED
|
@@ -15,10 +15,9 @@ export * from './gridFilterApi';
|
|
|
15
15
|
export * from './gridColumnMenuApi';
|
|
16
16
|
export * from './gridPreferencesPanelApi';
|
|
17
17
|
export * from './gridPrintExportApi';
|
|
18
|
-
export * from './gridDisableVirtualizationApi';
|
|
19
18
|
export * from './gridCallbackDetails';
|
|
20
19
|
export * from './gridScrollApi';
|
|
21
|
-
export * from './
|
|
20
|
+
export * from './gridVirtualizationApi';
|
|
22
21
|
export type { GridApiCommon } from './gridApiCommon';
|
|
23
22
|
export type { GridEditingApi, GridCellModesModel, GridRowModesModel } from './gridEditingApi';
|
|
24
23
|
export type GridEditRowApi = GridEditingApi;
|
package/models/api/index.js
CHANGED
|
@@ -10,8 +10,7 @@ export * from './gridFilterApi';
|
|
|
10
10
|
export * from './gridColumnMenuApi';
|
|
11
11
|
export * from './gridPreferencesPanelApi';
|
|
12
12
|
export * from './gridPrintExportApi';
|
|
13
|
-
export * from './gridDisableVirtualizationApi';
|
|
14
13
|
export * from './gridCallbackDetails';
|
|
15
14
|
export * from './gridScrollApi';
|
|
16
|
-
export * from './
|
|
15
|
+
export * from './gridVirtualizationApi';
|
|
17
16
|
export {};
|
|
@@ -173,6 +173,14 @@ export interface GridColumnHeaderEventLookup {
|
|
|
173
173
|
params: GridColumnHeaderParams;
|
|
174
174
|
event: React.DragEvent<HTMLElement>;
|
|
175
175
|
};
|
|
176
|
+
/**
|
|
177
|
+
* Fired when a `dblclick` DOM event happens in the column header separator.
|
|
178
|
+
* @ignore - do not document.
|
|
179
|
+
*/
|
|
180
|
+
columnSeparatorDoubleClick: {
|
|
181
|
+
params: GridColumnHeaderParams;
|
|
182
|
+
event: React.MouseEvent<HTMLElement>;
|
|
183
|
+
};
|
|
176
184
|
/**
|
|
177
185
|
* Fired when a `mousedown` DOM event happens in the column header separator.
|
|
178
186
|
* @ignore - do not document.
|
package/models/gridExport.d.ts
CHANGED
|
@@ -32,9 +32,9 @@ export interface GridFileExportOptions<Api extends GridApiCommon = GridApiCommun
|
|
|
32
32
|
*/
|
|
33
33
|
includeHeaders?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
* Function that returns the
|
|
35
|
+
* Function that returns the list of row ids to export on the order they should be exported.
|
|
36
36
|
* @param {GridGetRowsToExportParams} params With all properties from [[GridGetRowsToExportParams]].
|
|
37
|
-
* @returns {GridRowId[]} The
|
|
37
|
+
* @returns {GridRowId[]} The list of row ids to export.
|
|
38
38
|
*/
|
|
39
39
|
getRowsToExport?: (params: GridGetRowsToExportParams<Api>) => GridRowId[];
|
|
40
40
|
}
|
|
@@ -46,6 +46,8 @@ export interface GridGetRowsToExportParams<Api extends GridApiCommon = GridApiCo
|
|
|
46
46
|
}
|
|
47
47
|
export interface GridCsvGetRowsToExportParams<Api extends GridApiCommon = GridApiCommunity> extends GridGetRowsToExportParams<Api> {
|
|
48
48
|
}
|
|
49
|
+
export interface GridPrintGetRowsToExportParams<Api extends GridApiCommon = GridApiCommunity> extends GridGetRowsToExportParams<Api> {
|
|
50
|
+
}
|
|
49
51
|
/**
|
|
50
52
|
* The options to apply on the CSV export.
|
|
51
53
|
* @demos
|
|
@@ -81,9 +83,9 @@ export interface GridCsvExportOptions extends GridFileExportOptions {
|
|
|
81
83
|
*/
|
|
82
84
|
includeColumnGroupsHeaders?: boolean;
|
|
83
85
|
/**
|
|
84
|
-
* Function that returns the
|
|
86
|
+
* Function that returns the list of row ids to export on the order they should be exported.
|
|
85
87
|
* @param {GridCsvGetRowsToExportParams} params With all properties from [[GridCsvGetRowsToExportParams]].
|
|
86
|
-
* @returns {GridRowId[]} The
|
|
88
|
+
* @returns {GridRowId[]} The list of row ids to export.
|
|
87
89
|
*/
|
|
88
90
|
getRowsToExport?: (params: GridCsvGetRowsToExportParams) => GridRowId[];
|
|
89
91
|
}
|
|
@@ -108,6 +110,11 @@ export interface GridPrintExportOptions extends GridExportOptions {
|
|
|
108
110
|
* @default false
|
|
109
111
|
*/
|
|
110
112
|
hideFooter?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* If `true`, the selection checkboxes will be included when printing.
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
includeCheckboxes?: boolean;
|
|
111
118
|
/**
|
|
112
119
|
* If `false`, all <style> and <link type="stylesheet" /> tags from the <head> will not be copied
|
|
113
120
|
* to the print window.
|
|
@@ -122,6 +129,12 @@ export interface GridPrintExportOptions extends GridExportOptions {
|
|
|
122
129
|
* Provide Print specific styles to the print window.
|
|
123
130
|
*/
|
|
124
131
|
pageStyle?: string | Function;
|
|
132
|
+
/**
|
|
133
|
+
* Function that returns the list of row ids to export in the order they should be exported.
|
|
134
|
+
* @param {GridPrintGetRowsToExportParams} params With all properties from [[GridPrintGetRowsToExportParams]].
|
|
135
|
+
* @returns {GridRowId[]} The list of row ids to export.
|
|
136
|
+
*/
|
|
137
|
+
getRowsToExport?: (params: GridPrintGetRowsToExportParams) => GridRowId[];
|
|
125
138
|
}
|
|
126
139
|
/**
|
|
127
140
|
* Available export formats.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GridColumnMenuState, GridColumnsInitialState, GridColumnsState, GridColumnsGroupingState, GridDensityState, GridFilterInitialState, GridFilterState, GridFocusState, GridPaginationInitialState, GridPaginationState, GridPreferencePanelInitialState, GridPreferencePanelState, GridRowsState, GridSortingInitialState, GridSortingState, GridTabIndexState } from '../hooks';
|
|
1
|
+
import type { GridColumnMenuState, GridColumnsInitialState, GridColumnsState, GridColumnsGroupingState, GridDensityState, GridFilterInitialState, GridFilterState, GridFocusState, GridPaginationInitialState, GridPaginationState, GridPreferencePanelInitialState, GridPreferencePanelState, GridRowsState, GridSortingInitialState, GridSortingState, GridTabIndexState, GridVirtualizationState } from '../hooks';
|
|
2
2
|
import type { GridRowsMetaState } from '../hooks/features/rows/gridRowsMetaState';
|
|
3
3
|
import type { GridEditingState } from './gridEditRowModel';
|
|
4
4
|
import { GridHeaderFilteringState } from './gridHeaderFilteringModel';
|
|
@@ -24,6 +24,7 @@ export interface GridStateCommunity {
|
|
|
24
24
|
filter: GridFilterState;
|
|
25
25
|
preferencePanel: GridPreferencePanelState;
|
|
26
26
|
density: GridDensityState;
|
|
27
|
+
virtualization: GridVirtualizationState;
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* The initial state of `DataGrid`.
|
package/models/index.d.ts
CHANGED
|
@@ -24,5 +24,5 @@ export * from './muiEvent';
|
|
|
24
24
|
export * from './events';
|
|
25
25
|
export * from './gridSortModel';
|
|
26
26
|
export * from './gridColumnGrouping';
|
|
27
|
-
export type { GridExportOptions, GridFileExportOptions, GridGetRowsToExportParams, GridCsvGetRowsToExportParams, GridCsvExportOptions, GridPrintExportOptions, } from './gridExport';
|
|
27
|
+
export type { GridExportOptions, GridFileExportOptions, GridGetRowsToExportParams, GridCsvGetRowsToExportParams, GridPrintGetRowsToExportParams, GridCsvExportOptions, GridPrintExportOptions, } from './gridExport';
|
|
28
28
|
export * from './gridFilterOperator';
|
|
@@ -25,53 +25,56 @@ import { rowsMetaStateInitializer, useGridRowsMeta } from '../hooks/features/row
|
|
|
25
25
|
import { useGridStatePersistence } from '../hooks/features/statePersistence/useGridStatePersistence';
|
|
26
26
|
import { useGridColumnSpanning } from '../hooks/features/columns/useGridColumnSpanning';
|
|
27
27
|
import { useGridColumnGrouping, columnGroupsStateInitializer } from '../hooks/features/columnGrouping/useGridColumnGrouping';
|
|
28
|
+
import { useGridVirtualization, virtualizationStateInitializer } from '../hooks/features/virtualization';
|
|
28
29
|
export const useDataGridComponent = (inputApiRef, props) => {
|
|
29
|
-
const
|
|
30
|
+
const apiRef = useGridInitialization(inputApiRef, props);
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Register all pre-processors called during state initialization here.
|
|
33
34
|
*/
|
|
34
|
-
useGridRowSelectionPreProcessors(
|
|
35
|
-
useGridRowsPreProcessors(
|
|
35
|
+
useGridRowSelectionPreProcessors(apiRef, props);
|
|
36
|
+
useGridRowsPreProcessors(apiRef);
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Register all state initializers here.
|
|
39
40
|
*/
|
|
40
|
-
useGridInitializeState(rowSelectionStateInitializer,
|
|
41
|
-
useGridInitializeState(columnsStateInitializer,
|
|
42
|
-
useGridInitializeState(rowsStateInitializer,
|
|
43
|
-
useGridInitializeState(editingStateInitializer,
|
|
44
|
-
useGridInitializeState(focusStateInitializer,
|
|
45
|
-
useGridInitializeState(sortingStateInitializer,
|
|
46
|
-
useGridInitializeState(preferencePanelStateInitializer,
|
|
47
|
-
useGridInitializeState(filterStateInitializer,
|
|
48
|
-
useGridInitializeState(densityStateInitializer,
|
|
49
|
-
useGridInitializeState(paginationStateInitializer,
|
|
50
|
-
useGridInitializeState(rowsMetaStateInitializer,
|
|
51
|
-
useGridInitializeState(columnMenuStateInitializer,
|
|
52
|
-
useGridInitializeState(columnGroupsStateInitializer,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
41
|
+
useGridInitializeState(rowSelectionStateInitializer, apiRef, props);
|
|
42
|
+
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
|
43
|
+
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
|
44
|
+
useGridInitializeState(editingStateInitializer, apiRef, props);
|
|
45
|
+
useGridInitializeState(focusStateInitializer, apiRef, props);
|
|
46
|
+
useGridInitializeState(sortingStateInitializer, apiRef, props);
|
|
47
|
+
useGridInitializeState(preferencePanelStateInitializer, apiRef, props);
|
|
48
|
+
useGridInitializeState(filterStateInitializer, apiRef, props);
|
|
49
|
+
useGridInitializeState(densityStateInitializer, apiRef, props);
|
|
50
|
+
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
51
|
+
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
52
|
+
useGridInitializeState(columnMenuStateInitializer, apiRef, props);
|
|
53
|
+
useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
|
|
54
|
+
useGridInitializeState(virtualizationStateInitializer, apiRef, props);
|
|
55
|
+
useGridKeyboardNavigation(apiRef, props);
|
|
56
|
+
useGridRowSelection(apiRef, props);
|
|
57
|
+
useGridColumns(apiRef, props);
|
|
58
|
+
useGridRows(apiRef, props);
|
|
59
|
+
useGridParamsApi(apiRef, props);
|
|
60
|
+
useGridColumnSpanning(apiRef);
|
|
61
|
+
useGridColumnGrouping(apiRef, props);
|
|
62
|
+
useGridEditing(apiRef, props);
|
|
63
|
+
useGridFocus(apiRef, props);
|
|
64
|
+
useGridPreferencesPanel(apiRef, props);
|
|
65
|
+
useGridFilter(apiRef, props);
|
|
66
|
+
useGridSorting(apiRef, props);
|
|
67
|
+
useGridDensity(apiRef, props);
|
|
68
|
+
useGridPagination(apiRef, props);
|
|
69
|
+
useGridRowsMeta(apiRef, props);
|
|
70
|
+
useGridScroll(apiRef, props);
|
|
71
|
+
useGridColumnMenu(apiRef);
|
|
72
|
+
useGridCsvExport(apiRef, props);
|
|
73
|
+
useGridPrintExport(apiRef, props);
|
|
74
|
+
useGridClipboard(apiRef, props);
|
|
75
|
+
useGridDimensions(apiRef, props);
|
|
76
|
+
useGridEvents(apiRef, props);
|
|
77
|
+
useGridStatePersistence(apiRef);
|
|
78
|
+
useGridVirtualization(apiRef, props);
|
|
79
|
+
return apiRef;
|
|
77
80
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["className"
|
|
3
|
+
const _excluded = ["className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { GridVirtualScroller } from './virtualization/GridVirtualScroller';
|
|
6
6
|
import { GridVirtualScrollerContent } from './virtualization/GridVirtualScrollerContent';
|
|
@@ -11,8 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const DataGridVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGridVirtualScroller(props, ref) {
|
|
13
13
|
const {
|
|
14
|
-
className
|
|
15
|
-
disableVirtualization
|
|
14
|
+
className
|
|
16
15
|
} = props,
|
|
17
16
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
18
17
|
const {
|
|
@@ -21,8 +20,7 @@ const DataGridVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGridV
|
|
|
21
20
|
getRenderZoneProps,
|
|
22
21
|
getRows
|
|
23
22
|
} = useGridVirtualScroller({
|
|
24
|
-
ref
|
|
25
|
-
disableVirtualization
|
|
23
|
+
ref
|
|
26
24
|
});
|
|
27
25
|
return /*#__PURE__*/_jsxs(GridVirtualScroller, _extends({
|
|
28
26
|
className: className
|
|
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["innerRef", "className", "visibleColumns", "sortColumnLookup", "filterColumnLookup", "columnPositions", "columnHeaderTabIndexState", "columnGroupHeaderTabIndexState", "columnHeaderFocus", "columnGroupHeaderFocus", "densityFactor", "headerGroupingMaxDepth", "columnMenuState", "columnVisibility", "columnGroupsHeaderStructure", "hasOtherElementInTabSequence"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { refType } from '@mui/utils';
|
|
6
7
|
import { fastMemo } from '../utils/fastMemo';
|
|
7
8
|
import { useGridColumnHeaders } from '../hooks/features/columnHeaders/useGridColumnHeaders';
|
|
8
9
|
import { GridBaseColumnHeaders } from './columnHeaders/GridBaseColumnHeaders';
|
|
@@ -94,9 +95,7 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaders.propTypes = {
|
|
|
94
95
|
filterColumnLookup: PropTypes.object.isRequired,
|
|
95
96
|
hasOtherElementInTabSequence: PropTypes.bool.isRequired,
|
|
96
97
|
headerGroupingMaxDepth: PropTypes.number.isRequired,
|
|
97
|
-
innerRef:
|
|
98
|
-
current: PropTypes.object
|
|
99
|
-
})]),
|
|
98
|
+
innerRef: refType,
|
|
100
99
|
minColumnIndex: PropTypes.number,
|
|
101
100
|
sortColumnLookup: PropTypes.object.isRequired,
|
|
102
101
|
visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["selected", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"];
|
|
3
|
+
const _excluded = ["selected", "hovered", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -57,6 +57,7 @@ function EmptyCell({
|
|
|
57
57
|
const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
58
58
|
const {
|
|
59
59
|
selected,
|
|
60
|
+
hovered,
|
|
60
61
|
rowId,
|
|
61
62
|
row,
|
|
62
63
|
index,
|
|
@@ -92,6 +93,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
92
93
|
|
|
93
94
|
const ownerState = {
|
|
94
95
|
selected,
|
|
96
|
+
hovered,
|
|
95
97
|
isLastVisible,
|
|
96
98
|
classes: rootProps.classes,
|
|
97
99
|
editing: apiRef.current.getRowMode(rowId) === GridRowModes.Edit,
|
|
@@ -326,7 +328,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
326
328
|
"data-id": rowId,
|
|
327
329
|
"data-rowindex": index,
|
|
328
330
|
role: "row",
|
|
329
|
-
className: clsx(...rowClassNames, classes.root, className),
|
|
331
|
+
className: clsx(...rowClassNames, classes.root, className, hovered && 'Mui-hovered'),
|
|
330
332
|
"aria-rowindex": ariaRowIndex,
|
|
331
333
|
"aria-selected": selected,
|
|
332
334
|
style: style
|
|
@@ -39,7 +39,6 @@ function GridBody(props) {
|
|
|
39
39
|
const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
|
40
40
|
const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
|
|
41
41
|
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
|
|
42
|
-
const [isVirtualizationDisabled, setIsVirtualizationDisabled] = React.useState(rootProps.disableVirtualization);
|
|
43
42
|
useEnhancedEffect(() => {
|
|
44
43
|
apiRef.current.computeSizeAndPublishResizeEvent();
|
|
45
44
|
const elementToObserve = rootRef.current;
|
|
@@ -49,7 +48,7 @@ function GridBody(props) {
|
|
|
49
48
|
let animationFrame;
|
|
50
49
|
const observer = new ResizeObserver(() => {
|
|
51
50
|
// See https://github.com/mui/mui-x/issues/8733
|
|
52
|
-
animationFrame =
|
|
51
|
+
animationFrame = requestAnimationFrame(() => {
|
|
53
52
|
apiRef.current.computeSizeAndPublishResizeEvent();
|
|
54
53
|
});
|
|
55
54
|
});
|
|
@@ -65,24 +64,6 @@ function GridBody(props) {
|
|
|
65
64
|
}
|
|
66
65
|
};
|
|
67
66
|
}, [apiRef]);
|
|
68
|
-
const disableVirtualization = React.useCallback(() => {
|
|
69
|
-
setIsVirtualizationDisabled(true);
|
|
70
|
-
}, []);
|
|
71
|
-
const enableVirtualization = React.useCallback(() => {
|
|
72
|
-
setIsVirtualizationDisabled(false);
|
|
73
|
-
}, []);
|
|
74
|
-
React.useEffect(() => {
|
|
75
|
-
setIsVirtualizationDisabled(rootProps.disableVirtualization);
|
|
76
|
-
}, [rootProps.disableVirtualization]);
|
|
77
|
-
|
|
78
|
-
// The `useGridApiMethod` hook can't be used here, because it only installs the
|
|
79
|
-
// method if it doesn't exist yet. Once installed, it's never updated again.
|
|
80
|
-
// This break the methods above, since their closure comes from the first time
|
|
81
|
-
// they were installed. Which means that calling `setIsVirtualizationDisabled`
|
|
82
|
-
// will trigger a re-render, but it won't update the state. That can be solved
|
|
83
|
-
// by migrating the virtualization status to the global state.
|
|
84
|
-
apiRef.current.unstable_disableVirtualization = disableVirtualization;
|
|
85
|
-
apiRef.current.unstable_enableVirtualization = enableVirtualization;
|
|
86
67
|
const columnHeadersRef = React.useRef(null);
|
|
87
68
|
const columnsContainerRef = React.useRef(null);
|
|
88
69
|
const virtualScrollerRef = React.useRef(null);
|
|
@@ -119,8 +100,7 @@ function GridBody(props) {
|
|
|
119
100
|
// If this event is published while dimensions haven't been computed,
|
|
120
101
|
// the `onFetchRows` prop won't be called during mount.
|
|
121
102
|
, {
|
|
122
|
-
ref: virtualScrollerRef
|
|
123
|
-
disableVirtualization: isVirtualizationDisabled
|
|
103
|
+
ref: virtualScrollerRef
|
|
124
104
|
}), children]
|
|
125
105
|
});
|
|
126
106
|
}
|
|
@@ -164,11 +164,11 @@ function GridActionsCell(props) {
|
|
|
164
164
|
fontSize: "small"
|
|
165
165
|
})
|
|
166
166
|
})), menuButtons.length > 0 && /*#__PURE__*/_jsx(GridMenu, {
|
|
167
|
-
onClickAway: hideMenu,
|
|
168
|
-
onClick: hideMenu,
|
|
169
167
|
open: open,
|
|
170
168
|
target: buttonRef.current,
|
|
171
169
|
position: position,
|
|
170
|
+
onClose: hideMenu,
|
|
171
|
+
onClick: hideMenu,
|
|
172
172
|
children: /*#__PURE__*/_jsx(MenuList, {
|
|
173
173
|
id: menuId,
|
|
174
174
|
className: gridClasses.menuList,
|
|
@@ -231,7 +231,8 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
231
231
|
return {
|
|
232
232
|
padding: 0,
|
|
233
233
|
opacity: 0,
|
|
234
|
-
width: 0
|
|
234
|
+
width: 0,
|
|
235
|
+
border: 0
|
|
235
236
|
};
|
|
236
237
|
}
|
|
237
238
|
const cellStyle = {
|
|
@@ -495,7 +496,8 @@ const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
495
496
|
return {
|
|
496
497
|
padding: 0,
|
|
497
498
|
opacity: 0,
|
|
498
|
-
width: 0
|
|
499
|
+
width: 0,
|
|
500
|
+
border: 0
|
|
499
501
|
};
|
|
500
502
|
}
|
|
501
503
|
const cellStyle = {
|
|
@@ -94,7 +94,8 @@ function GridColumnHeaderItem(props) {
|
|
|
94
94
|
onDragEnd: publish('columnHeaderDragEnd')
|
|
95
95
|
} : {}, [isDraggable, publish]);
|
|
96
96
|
const columnHeaderSeparatorProps = React.useMemo(() => ({
|
|
97
|
-
onMouseDown: publish('columnSeparatorMouseDown')
|
|
97
|
+
onMouseDown: publish('columnSeparatorMouseDown'),
|
|
98
|
+
onDoubleClick: publish('columnSeparatorDoubleClick')
|
|
98
99
|
}), [publish]);
|
|
99
100
|
React.useEffect(() => {
|
|
100
101
|
if (!showColumnMenuIcon) {
|