@mui/x-data-grid 8.8.0 → 8.9.2
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 +225 -24
- package/DataGrid/DataGrid.js +5 -0
- package/DataGrid/index.d.ts +0 -1
- package/DataGrid/useDataGridComponent.js +10 -0
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/components/GridDetailPanels.d.ts +2 -2
- package/components/GridPinnedRows.d.ts +2 -2
- package/components/GridRow.js +5 -0
- package/components/GridScrollArea.js +1 -1
- package/components/cell/GridCell.js +7 -5
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/columnsManagement/GridColumnsManagement.d.ts +6 -0
- package/components/columnsManagement/GridColumnsManagement.js +17 -5
- package/components/containers/GridRootStyles.d.ts +1 -1
- package/components/containers/GridRootStyles.js +39 -0
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +5 -5
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +3 -1
- package/esm/DataGrid/DataGrid.js +5 -0
- package/esm/DataGrid/index.d.ts +0 -1
- package/esm/DataGrid/useDataGridComponent.js +10 -0
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/esm/components/GridDetailPanels.d.ts +2 -2
- package/esm/components/GridPinnedRows.d.ts +2 -2
- package/esm/components/GridRow.js +5 -0
- package/esm/components/GridScrollArea.js +1 -1
- package/esm/components/cell/GridCell.js +7 -5
- package/esm/components/cell/GridEditSingleSelectCell.js +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.d.ts +6 -0
- package/esm/components/columnsManagement/GridColumnsManagement.js +17 -5
- package/esm/components/containers/GridRootStyles.d.ts +1 -1
- package/esm/components/containers/GridRootStyles.js +39 -0
- package/esm/components/toolbarV8/Toolbar.d.ts +1 -1
- package/esm/components/virtualization/GridVirtualScroller.js +5 -5
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/constants/gridClasses.d.ts +12 -0
- package/esm/constants/gridClasses.js +3 -1
- package/esm/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +5 -0
- package/esm/hooks/core/pipeProcessing/useGridPipeProcessing.js +20 -5
- package/esm/hooks/core/useGridProps.d.ts +2 -2
- package/esm/hooks/core/useGridProps.js +3 -1
- package/esm/hooks/core/useGridVirtualizer.d.ts +9 -0
- package/esm/hooks/core/useGridVirtualizer.js +223 -0
- package/esm/hooks/features/columnGrouping/gridColumnGroupsInterfaces.d.ts +4 -1
- package/esm/hooks/features/columnGrouping/gridColumnGroupsUtils.js +35 -32
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +18 -13
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -2
- package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -3
- package/esm/hooks/features/columns/gridColumnsSelector.js +6 -2
- package/esm/hooks/features/columns/gridColumnsUtils.js +6 -4
- package/esm/hooks/features/columns/useGridColumnSpanning.js +5 -90
- package/esm/hooks/features/columns/useGridColumns.js +8 -10
- package/esm/hooks/features/dimensions/useGridDimensions.js +18 -188
- package/esm/hooks/features/export/utils.js +1 -1
- package/esm/hooks/features/filter/useGridFilter.js +3 -3
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -10
- package/esm/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/esm/hooks/features/keyboardNavigation/utils.js +5 -5
- package/esm/hooks/features/listView/gridListViewSelectors.d.ts +8 -1
- package/esm/hooks/features/listView/gridListViewSelectors.js +7 -0
- package/esm/hooks/features/pivoting/gridPivotingInterfaces.d.ts +0 -1
- package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +1 -4
- package/esm/hooks/features/pivoting/gridPivotingSelectors.js +1 -2
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/esm/hooks/features/rows/gridRowsMetaInterfaces.d.ts +2 -8
- package/esm/hooks/features/rows/gridRowsMetaState.d.ts +2 -18
- package/esm/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsUtils.js +5 -2
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +3 -1
- package/esm/hooks/features/rows/useGridRowSpanning.d.ts +2 -12
- package/esm/hooks/features/rows/useGridRowSpanning.js +54 -85
- package/esm/hooks/features/rows/useGridRows.js +4 -3
- package/esm/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/esm/hooks/features/rows/useGridRowsMeta.js +17 -187
- package/esm/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/esm/hooks/features/scroll/useGridScroll.js +2 -3
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/esm/hooks/features/virtualization/index.d.ts +1 -0
- package/esm/hooks/features/virtualization/index.js +1 -0
- package/esm/hooks/features/virtualization/useGridVirtualization.d.ts +5 -16
- package/esm/hooks/features/virtualization/useGridVirtualization.js +41 -22
- package/esm/hooks/utils/index.d.ts +2 -1
- package/esm/hooks/utils/index.js +2 -1
- package/esm/hooks/utils/useFirstRender.d.ts +1 -1
- package/esm/hooks/utils/useFirstRender.js +1 -8
- package/esm/hooks/utils/useGridInitializeState.d.ts +1 -1
- package/esm/hooks/utils/useGridInitializeState.js +6 -1
- package/esm/hooks/utils/useRunOncePerLoop.d.ts +1 -0
- package/esm/hooks/utils/useRunOncePerLoop.js +26 -0
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +1 -1
- package/esm/internals/index.js +1 -1
- package/esm/internals/utils/getPinnedCellOffset.js +5 -0
- package/esm/locales/frFR.js +18 -21
- package/esm/locales/heIL.js +12 -12
- package/esm/locales/plPL.js +22 -24
- package/esm/models/api/gridApiCommon.d.ts +4 -1
- package/esm/models/api/gridColumnSpanning.d.ts +5 -11
- package/esm/models/api/gridRowApi.d.ts +5 -0
- package/esm/models/events/gridEventLookup.d.ts +2 -1
- package/esm/models/gridApiCaches.d.ts +8 -2
- package/esm/models/gridStateCommunity.d.ts +2 -2
- package/esm/models/props/DataGridProps.d.ts +5 -0
- package/esm/utils/roundToDecimalPlaces.d.ts +1 -1
- package/esm/utils/roundToDecimalPlaces.js +1 -3
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +5 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +20 -5
- package/hooks/core/useGridProps.d.ts +2 -2
- package/hooks/core/useGridProps.js +3 -1
- package/hooks/core/useGridVirtualizer.d.ts +9 -0
- package/hooks/core/useGridVirtualizer.js +231 -0
- package/hooks/features/columnGrouping/gridColumnGroupsInterfaces.d.ts +4 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +35 -32
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +18 -13
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -3
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -3
- package/hooks/features/columns/gridColumnsSelector.js +6 -2
- package/hooks/features/columns/gridColumnsUtils.js +6 -4
- package/hooks/features/columns/useGridColumnSpanning.js +5 -91
- package/hooks/features/columns/useGridColumns.js +8 -10
- package/hooks/features/dimensions/useGridDimensions.js +18 -188
- package/hooks/features/export/utils.js +1 -1
- package/hooks/features/filter/useGridFilter.js +3 -3
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -10
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/hooks/features/keyboardNavigation/utils.js +5 -5
- package/hooks/features/listView/gridListViewSelectors.d.ts +8 -1
- package/hooks/features/listView/gridListViewSelectors.js +8 -1
- package/hooks/features/pivoting/gridPivotingInterfaces.d.ts +0 -1
- package/hooks/features/pivoting/gridPivotingSelectors.d.ts +1 -4
- package/hooks/features/pivoting/gridPivotingSelectors.js +2 -3
- package/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/hooks/features/rows/gridRowsMetaInterfaces.d.ts +2 -8
- package/hooks/features/rows/gridRowsMetaState.d.ts +2 -18
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.js +5 -2
- package/hooks/features/rows/useGridRowAriaAttributes.js +3 -1
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -12
- package/hooks/features/rows/useGridRowSpanning.js +54 -85
- package/hooks/features/rows/useGridRows.js +4 -3
- package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/hooks/features/rows/useGridRowsMeta.js +15 -186
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.js +2 -3
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/hooks/features/virtualization/index.d.ts +1 -0
- package/hooks/features/virtualization/index.js +12 -0
- package/hooks/features/virtualization/useGridVirtualization.d.ts +5 -16
- package/hooks/features/virtualization/useGridVirtualization.js +42 -24
- package/hooks/utils/index.d.ts +2 -1
- package/hooks/utils/index.js +16 -4
- package/hooks/utils/useFirstRender.d.ts +1 -1
- package/hooks/utils/useFirstRender.js +11 -11
- package/hooks/utils/useGridInitializeState.d.ts +1 -1
- package/hooks/utils/useGridInitializeState.js +6 -1
- package/hooks/utils/useRunOncePerLoop.d.ts +1 -0
- package/hooks/utils/useRunOncePerLoop.js +33 -0
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +4 -11
- package/internals/utils/getPinnedCellOffset.js +5 -0
- package/locales/frFR.js +18 -21
- package/locales/heIL.js +12 -12
- package/locales/plPL.js +22 -24
- package/models/api/gridApiCommon.d.ts +4 -1
- package/models/api/gridColumnSpanning.d.ts +5 -11
- package/models/api/gridRowApi.d.ts +5 -0
- package/models/events/gridEventLookup.d.ts +2 -1
- package/models/gridApiCaches.d.ts +8 -2
- package/models/gridStateCommunity.d.ts +2 -2
- package/models/props/DataGridProps.d.ts +5 -0
- package/package.json +5 -5
- package/utils/roundToDecimalPlaces.d.ts +1 -1
- package/utils/roundToDecimalPlaces.js +7 -4
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +0 -10
- package/esm/hooks/features/rows/gridRowSpanningSelectors.js +0 -5
- package/esm/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -56
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +0 -846
- package/esm/hooks/utils/useRunOnce.d.ts +0 -5
- package/esm/hooks/utils/useRunOnce.js +0 -18
- package/esm/utils/platform.d.ts +0 -1
- package/esm/utils/platform.js +0 -2
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +0 -10
- package/hooks/features/rows/gridRowSpanningSelectors.js +0 -11
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -56
- package/hooks/features/virtualization/useGridVirtualScroller.js +0 -857
- package/hooks/utils/useRunOnce.d.ts +0 -5
- package/hooks/utils/useRunOnce.js +0 -27
- package/utils/platform.d.ts +0 -1
- package/utils/platform.js +0 -8
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import { Virtualization } from '@mui/x-virtualizer';
|
|
3
3
|
import { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
4
|
-
import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
5
4
|
import { GridStateInitializer } from "../../utils/useGridInitializeState.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
enabledForColumns: boolean;
|
|
10
|
-
enabledForRows: boolean;
|
|
11
|
-
renderContext: GridRenderContext;
|
|
12
|
-
};
|
|
13
|
-
export declare const EMPTY_RENDER_CONTEXT: {
|
|
14
|
-
firstRowIndex: number;
|
|
15
|
-
lastRowIndex: number;
|
|
16
|
-
firstColumnIndex: number;
|
|
17
|
-
lastColumnIndex: number;
|
|
18
|
-
};
|
|
5
|
+
import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
6
|
+
type RootProps = DataGridProcessedProps;
|
|
7
|
+
export type GridVirtualizationState = { [K in keyof Virtualization.State['virtualization']]: Virtualization.State['virtualization'][K] };
|
|
19
8
|
export declare const virtualizationStateInitializer: GridStateInitializer<RootProps>;
|
|
20
|
-
export declare function useGridVirtualization(apiRef: RefObject<GridPrivateApiCommunity>,
|
|
9
|
+
export declare function useGridVirtualization(apiRef: RefObject<GridPrivateApiCommunity>, rootProps: RootProps): void;
|
|
21
10
|
export {};
|
|
@@ -2,47 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import { EMPTY_RENDER_CONTEXT } from '@mui/x-virtualizer';
|
|
6
|
+
import { isJSDOM } from "../../../utils/isJSDOM.js";
|
|
5
7
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { useGridEventPriority } from "../../utils/index.js";
|
|
9
|
+
const HAS_LAYOUT = !isJSDOM;
|
|
10
|
+
|
|
11
|
+
// HACK: Typescript doesn't use the alias name ("GridVirtualizationState") and changes
|
|
12
|
+
// the autogenerated docs result, but this would otherwise be just:
|
|
13
|
+
// export type GridVirtualizationState = VirtualizationState;
|
|
14
|
+
|
|
15
|
+
// XXX: We want to use the virtualizer as the source of truth for its state, but this needs to
|
|
16
|
+
// stay because some parts of the grid require the `virtualization` state during initialization.
|
|
12
17
|
export const virtualizationStateInitializer = (state, props) => {
|
|
13
18
|
const {
|
|
14
19
|
disableVirtualization,
|
|
15
20
|
autoHeight
|
|
16
21
|
} = props;
|
|
17
22
|
const virtualization = {
|
|
18
|
-
enabled: !disableVirtualization,
|
|
19
|
-
enabledForColumns: !disableVirtualization,
|
|
20
|
-
enabledForRows: !disableVirtualization && !autoHeight,
|
|
23
|
+
enabled: !disableVirtualization && HAS_LAYOUT,
|
|
24
|
+
enabledForColumns: !disableVirtualization && HAS_LAYOUT,
|
|
25
|
+
enabledForRows: !disableVirtualization && !autoHeight && HAS_LAYOUT,
|
|
21
26
|
renderContext: EMPTY_RENDER_CONTEXT
|
|
22
27
|
};
|
|
23
28
|
return _extends({}, state, {
|
|
24
29
|
virtualization
|
|
25
30
|
});
|
|
26
31
|
};
|
|
27
|
-
export function useGridVirtualization(apiRef,
|
|
32
|
+
export function useGridVirtualization(apiRef, rootProps) {
|
|
33
|
+
const {
|
|
34
|
+
virtualizer
|
|
35
|
+
} = apiRef.current;
|
|
36
|
+
const {
|
|
37
|
+
autoHeight,
|
|
38
|
+
disableVirtualization
|
|
39
|
+
} = rootProps;
|
|
40
|
+
|
|
28
41
|
/*
|
|
29
42
|
* API METHODS
|
|
30
43
|
*/
|
|
31
44
|
|
|
32
45
|
const setVirtualization = enabled => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
})
|
|
46
|
+
enabled &&= HAS_LAYOUT;
|
|
47
|
+
virtualizer.store.set('virtualization', _extends({}, virtualizer.store.state.virtualization, {
|
|
48
|
+
enabled,
|
|
49
|
+
enabledForColumns: enabled,
|
|
50
|
+
enabledForRows: enabled && !autoHeight
|
|
39
51
|
}));
|
|
40
52
|
};
|
|
41
53
|
const setColumnVirtualization = enabled => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})
|
|
54
|
+
enabled &&= HAS_LAYOUT;
|
|
55
|
+
virtualizer.store.set('virtualization', _extends({}, virtualizer.store.state.virtualization, {
|
|
56
|
+
enabledForColumns: enabled
|
|
46
57
|
}));
|
|
47
58
|
};
|
|
48
59
|
const api = {
|
|
@@ -50,14 +61,22 @@ export function useGridVirtualization(apiRef, props) {
|
|
|
50
61
|
unstable_setColumnVirtualization: setColumnVirtualization
|
|
51
62
|
};
|
|
52
63
|
useGridApiMethod(apiRef, api, 'public');
|
|
64
|
+
const forceUpdateRenderContext = virtualizer.api.forceUpdateRenderContext;
|
|
65
|
+
apiRef.current.register('private', {
|
|
66
|
+
updateRenderContext: forceUpdateRenderContext
|
|
67
|
+
});
|
|
53
68
|
|
|
54
69
|
/*
|
|
55
70
|
* EFFECTS
|
|
56
71
|
*/
|
|
57
72
|
|
|
73
|
+
useGridEventPriority(apiRef, 'sortedRowsSet', forceUpdateRenderContext);
|
|
74
|
+
useGridEventPriority(apiRef, 'paginationModelChange', forceUpdateRenderContext);
|
|
75
|
+
useGridEventPriority(apiRef, 'columnsChange', forceUpdateRenderContext);
|
|
76
|
+
|
|
58
77
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
59
78
|
React.useEffect(() => {
|
|
60
|
-
setVirtualization(!
|
|
61
|
-
}, [
|
|
79
|
+
setVirtualization(!rootProps.disableVirtualization);
|
|
80
|
+
}, [disableVirtualization, autoHeight]);
|
|
62
81
|
/* eslint-enable react-hooks/exhaustive-deps */
|
|
63
82
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from '@mui/x-internals/useRunOnce';
|
|
1
2
|
export { useGridEvent, useGridEventPriority, unstable_resetCleanupTracking } from "./useGridEvent.js";
|
|
2
3
|
export * from "./useGridApiMethod.js";
|
|
3
4
|
export * from "./useGridLogger.js";
|
|
@@ -5,5 +6,5 @@ export { useGridSelector } from "./useGridSelector.js";
|
|
|
5
6
|
export * from "./useGridNativeEventListener.js";
|
|
6
7
|
export * from "./useFirstRender.js";
|
|
7
8
|
export * from "./useOnMount.js";
|
|
8
|
-
export * from "./
|
|
9
|
+
export * from "./useRunOncePerLoop.js";
|
|
9
10
|
export type { RenderProp } from '@mui/x-internals/useComponentRenderer';
|
package/esm/hooks/utils/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from '@mui/x-internals/useRunOnce';
|
|
1
2
|
export { useGridEvent, useGridEventPriority, unstable_resetCleanupTracking } from "./useGridEvent.js";
|
|
2
3
|
export * from "./useGridApiMethod.js";
|
|
3
4
|
export * from "./useGridLogger.js";
|
|
@@ -5,4 +6,4 @@ export { useGridSelector } from "./useGridSelector.js";
|
|
|
5
6
|
export * from "./useGridNativeEventListener.js";
|
|
6
7
|
export * from "./useFirstRender.js";
|
|
7
8
|
export * from "./useOnMount.js";
|
|
8
|
-
export * from "./
|
|
9
|
+
export * from "./useRunOncePerLoop.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from '@mui/x-internals/useFirstRender';
|
|
@@ -4,5 +4,5 @@ import { GridPrivateApiCommunity } from "../../models/api/gridApiCommunity.js";
|
|
|
4
4
|
import { DataGridProcessedProps } from "../../models/props/DataGridProps.js";
|
|
5
5
|
type DeepPartial<T> = { [P in keyof T]?: DeepPartial<T[P]> };
|
|
6
6
|
export type GridStateInitializer<P extends Partial<DataGridProcessedProps> = DataGridProcessedProps, PrivateApi extends GridPrivateApiCommon = GridPrivateApiCommunity> = (state: DeepPartial<PrivateApi['state']>, props: P, privateApiRef: RefObject<PrivateApi>) => DeepPartial<PrivateApi['state']>;
|
|
7
|
-
export declare const useGridInitializeState: <P extends Partial<DataGridProcessedProps>, PrivateApi extends GridPrivateApiCommon = GridPrivateApiCommunity>(initializer: GridStateInitializer<P, PrivateApi>, privateApiRef: RefObject<PrivateApi>, props: P) => void;
|
|
7
|
+
export declare const useGridInitializeState: <P extends Partial<DataGridProcessedProps>, PrivateApi extends GridPrivateApiCommon = GridPrivateApiCommunity>(initializer: GridStateInitializer<P, PrivateApi>, privateApiRef: RefObject<PrivateApi>, props: P, key?: string) => void;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export const useGridInitializeState = (initializer, privateApiRef, props) => {
|
|
2
|
+
export const useGridInitializeState = (initializer, privateApiRef, props, key) => {
|
|
3
|
+
const previousKey = React.useRef(key);
|
|
3
4
|
const isInitialized = React.useRef(false);
|
|
5
|
+
if (key !== previousKey.current) {
|
|
6
|
+
isInitialized.current = false;
|
|
7
|
+
previousKey.current = key;
|
|
8
|
+
}
|
|
4
9
|
if (!isInitialized.current) {
|
|
5
10
|
privateApiRef.current.state = initializer(privateApiRef.current.state, props, privateApiRef);
|
|
6
11
|
isInitialized.current = true;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useRunOncePerLoop<T extends (...args: any[]) => void>(callback: T, nextFrame?: boolean): (...args: Parameters<T>) => void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export function useRunOncePerLoop(callback, nextFrame = false) {
|
|
3
|
+
const scheduledRef = React.useRef(false);
|
|
4
|
+
const schedule = React.useCallback((...args) => {
|
|
5
|
+
if (scheduledRef.current) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
scheduledRef.current = true;
|
|
9
|
+
const runner = () => {
|
|
10
|
+
scheduledRef.current = false;
|
|
11
|
+
callback(...args);
|
|
12
|
+
};
|
|
13
|
+
if (nextFrame) {
|
|
14
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
15
|
+
requestAnimationFrame(runner);
|
|
16
|
+
}
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (typeof queueMicrotask === 'function') {
|
|
20
|
+
queueMicrotask(runner);
|
|
21
|
+
} else {
|
|
22
|
+
Promise.resolve().then(runner);
|
|
23
|
+
}
|
|
24
|
+
}, [callback, nextFrame]);
|
|
25
|
+
return schedule;
|
|
26
|
+
}
|
package/esm/index.js
CHANGED
package/esm/internals/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { GridBaseColumnHeaders } from "../components/columnHeaders/GridBaseColum
|
|
|
12
12
|
export { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from "../constants/defaultGridSlotsComponents.js";
|
|
13
13
|
export * from "../constants/signature.js";
|
|
14
14
|
export { vars } from "../constants/cssVariables.js";
|
|
15
|
+
export { useGridVirtualizer } from "../hooks/core/useGridVirtualizer.js";
|
|
15
16
|
export { propsStateInitializer } from "../hooks/core/useGridProps.js";
|
|
16
17
|
export { getGridFilter } from "../components/panel/filterPanel/GridFilterPanel.js";
|
|
17
18
|
export { getValueOptions } from "../components/panel/filterPanel/filterPanelUtils.js";
|
|
@@ -72,7 +73,6 @@ export { dimensionsStateInitializer, useGridDimensions } from "../hooks/features
|
|
|
72
73
|
export * from "../hooks/features/dimensions/gridDimensionsSelectors.js";
|
|
73
74
|
export { useGridStatePersistence } from "../hooks/features/statePersistence/useGridStatePersistence.js";
|
|
74
75
|
export type { GridRestoreStatePreProcessingContext } from "../hooks/features/statePersistence/gridStatePersistenceInterface.js";
|
|
75
|
-
export { useGridVirtualScroller, EMPTY_DETAIL_PANELS } from "../hooks/features/virtualization/useGridVirtualScroller.js";
|
|
76
76
|
export * from "../hooks/features/virtualization/index.js";
|
|
77
77
|
export { useGridColumnResize, columnResizeStateInitializer } from "../hooks/features/columnResize/useGridColumnResize.js";
|
|
78
78
|
export { ROW_SELECTION_PROPAGATION_DEFAULT } from "../hooks/features/rowSelection/utils.js";
|
package/esm/internals/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { GridBaseColumnHeaders } from "../components/columnHeaders/GridBaseColum
|
|
|
8
8
|
export { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from "../constants/defaultGridSlotsComponents.js";
|
|
9
9
|
export * from "../constants/signature.js";
|
|
10
10
|
export { vars } from "../constants/cssVariables.js";
|
|
11
|
+
export { useGridVirtualizer } from "../hooks/core/useGridVirtualizer.js";
|
|
11
12
|
export { propsStateInitializer } from "../hooks/core/useGridProps.js";
|
|
12
13
|
export { getGridFilter } from "../components/panel/filterPanel/GridFilterPanel.js";
|
|
13
14
|
export { getValueOptions } from "../components/panel/filterPanel/filterPanelUtils.js";
|
|
@@ -58,7 +59,6 @@ export { useGridEvents } from "../hooks/features/events/useGridEvents.js";
|
|
|
58
59
|
export { dimensionsStateInitializer, useGridDimensions } from "../hooks/features/dimensions/useGridDimensions.js";
|
|
59
60
|
export * from "../hooks/features/dimensions/gridDimensionsSelectors.js";
|
|
60
61
|
export { useGridStatePersistence } from "../hooks/features/statePersistence/useGridStatePersistence.js";
|
|
61
|
-
export { useGridVirtualScroller, EMPTY_DETAIL_PANELS } from "../hooks/features/virtualization/useGridVirtualScroller.js";
|
|
62
62
|
export * from "../hooks/features/virtualization/index.js";
|
|
63
63
|
export { useGridColumnResize, columnResizeStateInitializer } from "../hooks/features/columnResize/useGridColumnResize.js";
|
|
64
64
|
export { ROW_SELECTION_PROPAGATION_DEFAULT } from "../hooks/features/rowSelection/utils.js";
|
|
@@ -12,5 +12,10 @@ export const getPinnedCellOffset = (pinnedPosition, computedWidth, columnIndex,
|
|
|
12
12
|
pinnedOffset = undefined;
|
|
13
13
|
break;
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
// XXX: fix this properly
|
|
17
|
+
if (Number.isNaN(pinnedOffset)) {
|
|
18
|
+
pinnedOffset = undefined;
|
|
19
|
+
}
|
|
15
20
|
return pinnedOffset;
|
|
16
21
|
};
|
package/esm/locales/frFR.js
CHANGED
|
@@ -3,8 +3,8 @@ const frFRGrid = {
|
|
|
3
3
|
// Root
|
|
4
4
|
noRowsLabel: 'Pas de résultats',
|
|
5
5
|
noResultsOverlayLabel: 'Aucun résultat.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
noColumnsOverlayLabel: 'Aucune colonne',
|
|
7
|
+
noColumnsOverlayManageColumns: 'Gérer les colonnes',
|
|
8
8
|
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
|
|
9
9
|
|
|
10
10
|
// Density selector toolbar button text
|
|
@@ -36,15 +36,13 @@ const frFRGrid = {
|
|
|
36
36
|
// toolbarPivot: 'Pivot',
|
|
37
37
|
|
|
38
38
|
// Toolbar AI Assistant button
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
toolbarAssistant: 'Assistant IA',
|
|
41
40
|
// Columns management text
|
|
42
41
|
columnsManagementSearchTitle: 'Rechercher',
|
|
43
42
|
columnsManagementNoColumns: 'Pas de colonnes',
|
|
44
43
|
columnsManagementShowHideAllText: 'Afficher/masquer toutes',
|
|
45
44
|
columnsManagementReset: 'Réinitialiser',
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
columnsManagementDeleteIconLabel: 'Effacer',
|
|
48
46
|
// Filter panel text
|
|
49
47
|
filterPanelAddFilter: 'Ajouter un filtre',
|
|
50
48
|
filterPanelRemoveAll: 'Tout supprimer',
|
|
@@ -100,15 +98,14 @@ const frFRGrid = {
|
|
|
100
98
|
'headerFilterOperator>=': 'Est supérieur ou égal à',
|
|
101
99
|
'headerFilterOperator<': 'Est inférieur à',
|
|
102
100
|
'headerFilterOperator<=': 'Est inférieur ou égal à',
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
headerFilterClear: 'Effacer le filtre',
|
|
105
102
|
// Filter values text
|
|
106
103
|
filterValueAny: 'tous',
|
|
107
104
|
filterValueTrue: 'vrai',
|
|
108
105
|
filterValueFalse: 'faux',
|
|
109
106
|
// Column menu text
|
|
110
107
|
columnMenuLabel: 'Menu',
|
|
111
|
-
|
|
108
|
+
columnMenuAriaLabel: columnName => `Menu pour la colonne ${columnName}`,
|
|
112
109
|
columnMenuShowColumns: 'Afficher les colonnes',
|
|
113
110
|
columnMenuManageColumns: 'Gérer les colonnes',
|
|
114
111
|
columnMenuFilter: 'Filtrer',
|
|
@@ -157,18 +154,18 @@ const frFRGrid = {
|
|
|
157
154
|
collapseDetailPanel: 'Masquer',
|
|
158
155
|
// Pagination
|
|
159
156
|
paginationRowsPerPage: 'Lignes par page :',
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
157
|
+
paginationDisplayedRows: ({
|
|
158
|
+
from,
|
|
159
|
+
to,
|
|
160
|
+
count,
|
|
161
|
+
estimated
|
|
162
|
+
}) => {
|
|
163
|
+
if (!estimated) {
|
|
164
|
+
return `${from}–${to} sur ${count !== -1 ? count : `plus de ${to}`}`;
|
|
165
|
+
}
|
|
166
|
+
const estimatedLabel = estimated && estimated > to ? `environ ${estimated}` : `plus de ${to}`;
|
|
167
|
+
return `${from}–${to} sur ${count !== -1 ? count : estimatedLabel}`;
|
|
168
|
+
},
|
|
172
169
|
paginationItemAriaLabel: type => {
|
|
173
170
|
if (type === 'first') {
|
|
174
171
|
return 'Aller à la première page';
|
package/esm/locales/heIL.js
CHANGED
|
@@ -156,18 +156,18 @@ const heILGrid = {
|
|
|
156
156
|
collapseDetailPanel: 'כווץ',
|
|
157
157
|
// Pagination
|
|
158
158
|
paginationRowsPerPage: 'שורות בעמוד:',
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
159
|
+
paginationDisplayedRows: ({
|
|
160
|
+
from,
|
|
161
|
+
to,
|
|
162
|
+
count,
|
|
163
|
+
estimated
|
|
164
|
+
}) => {
|
|
165
|
+
if (!estimated) {
|
|
166
|
+
return `${from}-${to} מתוך ${count !== -1 ? count : `יותר מ־${to}`}`;
|
|
167
|
+
}
|
|
168
|
+
const estimatedLabel = estimated && estimated > to ? `כ־${estimated}` : `יותר מ־${to}`;
|
|
169
|
+
return `${from}-${to} מתוך ${count !== -1 ? count : estimatedLabel}`;
|
|
170
|
+
},
|
|
171
171
|
paginationItemAriaLabel: type => {
|
|
172
172
|
if (type === 'first') {
|
|
173
173
|
return 'לעמוד הראשון';
|
package/esm/locales/plPL.js
CHANGED
|
@@ -3,8 +3,8 @@ const plPLGrid = {
|
|
|
3
3
|
// Root
|
|
4
4
|
noRowsLabel: 'Brak danych',
|
|
5
5
|
noResultsOverlayLabel: 'Nie znaleziono wyników.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
noColumnsOverlayLabel: 'Brak kolumn',
|
|
7
|
+
noColumnsOverlayManageColumns: 'Zarządzaj kolumnami',
|
|
8
8
|
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
|
|
9
9
|
|
|
10
10
|
// Density selector toolbar button text
|
|
@@ -36,8 +36,7 @@ const plPLGrid = {
|
|
|
36
36
|
// toolbarPivot: 'Pivot',
|
|
37
37
|
|
|
38
38
|
// Toolbar AI Assistant button
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
toolbarAssistant: 'Asystent AI',
|
|
41
40
|
// Columns management text
|
|
42
41
|
columnsManagementSearchTitle: 'Szukaj',
|
|
43
42
|
columnsManagementNoColumns: 'Brak kolumn',
|
|
@@ -155,18 +154,18 @@ const plPLGrid = {
|
|
|
155
154
|
collapseDetailPanel: 'Zwiń',
|
|
156
155
|
// Pagination
|
|
157
156
|
paginationRowsPerPage: 'Wierszy na stronę:',
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
157
|
+
paginationDisplayedRows: ({
|
|
158
|
+
from,
|
|
159
|
+
to,
|
|
160
|
+
count,
|
|
161
|
+
estimated
|
|
162
|
+
}) => {
|
|
163
|
+
if (!estimated) {
|
|
164
|
+
return `${from}–${to} z ${count !== -1 ? count : `więcej niż ${to}`}`;
|
|
165
|
+
}
|
|
166
|
+
const estimatedLabel = estimated && estimated > to ? `około ${estimated}` : `więcej niż ${to}`;
|
|
167
|
+
return `${from}–${to} z ${count !== -1 ? count : estimatedLabel}`;
|
|
168
|
+
},
|
|
170
169
|
paginationItemAriaLabel: type => {
|
|
171
170
|
if (type === 'first') {
|
|
172
171
|
return 'Przejdź do pierwszej strony';
|
|
@@ -219,19 +218,18 @@ const plPLGrid = {
|
|
|
219
218
|
// pivotQuarterColumnHeaderName: '(Quarter)',
|
|
220
219
|
|
|
221
220
|
// AI Assistant panel
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
221
|
+
aiAssistantPanelTitle: 'Asystent AI',
|
|
222
|
+
aiAssistantPanelClose: 'Zamknij asystenta AI',
|
|
223
|
+
aiAssistantPanelNewConversation: 'Nowa konwersacja',
|
|
224
|
+
aiAssistantPanelConversationHistory: 'Historia konwersacji',
|
|
225
|
+
aiAssistantPanelEmptyConversation: 'Brak historii poleceń',
|
|
226
|
+
aiAssistantSuggestions: 'Sugestie',
|
|
229
227
|
// Prompt field
|
|
230
228
|
promptFieldLabel: 'Wprowadź polecenie',
|
|
231
229
|
promptFieldPlaceholder: 'Wpisz polecenie…',
|
|
232
230
|
promptFieldPlaceholderWithRecording: 'Wpisz lub nagraj polecenie…',
|
|
233
231
|
promptFieldPlaceholderListening: 'Nasłuchiwanie polecenia…',
|
|
234
|
-
|
|
232
|
+
promptFieldSpeechRecognitionNotSupported: 'Rozpoznawanie głosu nie jest obsługiwane przez Twoją przeglądarkę.',
|
|
235
233
|
promptFieldSend: 'Wyślij',
|
|
236
234
|
promptFieldRecord: 'Nagrywaj',
|
|
237
235
|
promptFieldStopRecording: 'Zatrzymaj nagrywanie'
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Virtualizer } from '@mui/x-virtualizer';
|
|
1
2
|
import type { GridColumnApi } from "./gridColumnApi.js";
|
|
2
3
|
import type { GridColumnMenuApi } from "./gridColumnMenuApi.js";
|
|
3
4
|
import type { GridCoreApi, GridCorePrivateApi } from "./gridCoreApi.js";
|
|
@@ -31,5 +32,7 @@ import type { DataGridProcessedProps } from "../props/DataGridProps.js";
|
|
|
31
32
|
import type { GridColumnResizeApi } from "../../hooks/features/columnResize/index.js";
|
|
32
33
|
import type { GridPivotingPrivateApiCommunity } from "../../hooks/features/pivoting/gridPivotingInterfaces.js";
|
|
33
34
|
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, GridColumnResizeApi {}
|
|
34
|
-
export interface GridPrivateOnlyApiCommon<Api extends GridApiCommon, PrivateApi extends GridPrivateApiCommon, Props extends DataGridProcessedProps> extends GridCorePrivateApi<Api, PrivateApi, Props>, GridStatePrivateApi<PrivateApi['state']>, GridPipeProcessingPrivateApi, GridStrategyProcessingApi, GridColumnSpanningPrivateApi, GridRowsMetaPrivateApi, GridDimensionsPrivateApi, GridEditingPrivateApi, GridLoggerApi, GridFocusPrivateApi, GridHeaderFilteringPrivateApi, GridVirtualizationPrivateApi, GridRowProPrivateApi, GridParamsPrivateApi, GridPivotingPrivateApiCommunity {
|
|
35
|
+
export interface GridPrivateOnlyApiCommon<Api extends GridApiCommon, PrivateApi extends GridPrivateApiCommon, Props extends DataGridProcessedProps> extends GridCorePrivateApi<Api, PrivateApi, Props>, GridStatePrivateApi<PrivateApi['state']>, GridPipeProcessingPrivateApi, GridStrategyProcessingApi, GridColumnSpanningPrivateApi, GridRowsMetaPrivateApi, GridDimensionsPrivateApi, GridEditingPrivateApi, GridLoggerApi, GridFocusPrivateApi, GridHeaderFilteringPrivateApi, GridVirtualizationPrivateApi, GridRowProPrivateApi, GridParamsPrivateApi, GridPivotingPrivateApiCommunity {
|
|
36
|
+
virtualizer: Virtualizer;
|
|
37
|
+
}
|
|
35
38
|
export interface GridPrivateApiCommon extends GridApiCommon, GridPrivateOnlyApiCommon<GridApiCommon, GridPrivateApiCommon, DataGridProcessedProps> {}
|
|
@@ -19,16 +19,10 @@ export interface GridColumnSpanningPrivateApi {
|
|
|
19
19
|
resetColSpan: () => void;
|
|
20
20
|
/**
|
|
21
21
|
* Calculate column spanning for each cell in the row
|
|
22
|
-
* @param {
|
|
23
|
-
* @param {
|
|
24
|
-
* @param {number}
|
|
25
|
-
* @param {
|
|
26
|
-
* @param {GridStateColDef[]} options.columns List of columns to calculate colSpan for
|
|
22
|
+
* @param {GridRowId} rowId The row id
|
|
23
|
+
* @param {number} minFirstColumn First visible column index
|
|
24
|
+
* @param {number} maxLastColumn Last visible column index
|
|
25
|
+
* @param {GridStateColDef[]} columns List of columns to calculate colSpan for
|
|
27
26
|
*/
|
|
28
|
-
calculateColSpan: (
|
|
29
|
-
rowId: GridRowId;
|
|
30
|
-
minFirstColumn: number;
|
|
31
|
-
maxLastColumn: number;
|
|
32
|
-
columns: GridStateColDef[];
|
|
33
|
-
}) => void;
|
|
27
|
+
calculateColSpan: (rowId: GridRowId, minFirstColumn: number, maxLastColumn: number, columns: GridStateColDef[]) => void;
|
|
34
28
|
}
|
|
@@ -19,6 +19,11 @@ export interface GridRowGroupChildrenGetterParams {
|
|
|
19
19
|
* @default false
|
|
20
20
|
*/
|
|
21
21
|
applySorting?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* If `true`, the method will only return the direct leaf children of the group
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
directChildrenOnly?: boolean;
|
|
22
27
|
}
|
|
23
28
|
/**
|
|
24
29
|
* The Row API interface that is available in the grid `apiRef`.
|
|
@@ -77,11 +77,12 @@ export interface GridRowEventLookup {
|
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* Fired when the dragging of a row ends.
|
|
80
|
+
* It's mapped to the `dragend` DOM event.
|
|
80
81
|
* @ignore - do not document.
|
|
81
82
|
*/
|
|
82
83
|
rowDragEnd: {
|
|
83
84
|
params: GridRowParams;
|
|
84
|
-
event:
|
|
85
|
+
event: DragEvent;
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
88
|
export interface GridColumnHeaderEventLookup {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { GridRowsInternalCache } from "../hooks/features/rows/gridRowsInterfaces.js";
|
|
2
|
-
import { GridRowsMetaInternalCache } from "../hooks/features/rows/gridRowsMetaInterfaces.js";
|
|
1
|
+
import type { GridRowsInternalCache } from "../hooks/features/rows/gridRowsInterfaces.js";
|
|
2
|
+
import type { GridRowsMetaInternalCache } from "../hooks/features/rows/gridRowsMetaInterfaces.js";
|
|
3
|
+
import type { GridColumnGroupingInternalCache } from "../hooks/features/columnGrouping/gridColumnGroupsInterfaces.js";
|
|
4
|
+
import type { GridColDef } from "./colDef/index.js";
|
|
3
5
|
export interface GridApiCaches {
|
|
6
|
+
columns: {
|
|
7
|
+
lastColumnsProp: readonly GridColDef[];
|
|
8
|
+
};
|
|
9
|
+
columnGrouping: GridColumnGroupingInternalCache;
|
|
4
10
|
rows: GridRowsInternalCache;
|
|
5
11
|
rowsMeta: GridRowsMetaInternalCache;
|
|
6
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GridColumnMenuState, GridColumnsInitialState, GridColumnsState, GridColumnsGroupingState, GridColumnPinningState, GridDensityState, GridDimensionsState, GridFilterInitialState, GridFilterState, GridFocusState, GridPaginationInitialState, GridPaginationState, GridPreferencePanelInitialState, GridPreferencePanelState, GridRowsState, GridSortingInitialState, GridSortingState, GridTabIndexState, GridVirtualizationState } from "../hooks/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataGridProcessedProps } from "./props/DataGridProps.js";
|
|
3
3
|
import type { GridRowsMetaState } from "../hooks/features/rows/gridRowsMetaState.js";
|
|
4
4
|
import type { GridEditingState } from "./gridEditRowModel.js";
|
|
5
5
|
import { GridHeaderFilteringState } from "./gridHeaderFilteringModel.js";
|
|
@@ -12,7 +12,7 @@ import type { GridListViewState } from "../hooks/features/listView/useGridListVi
|
|
|
12
12
|
* Some props are passed on the state to enable grid selectors to select
|
|
13
13
|
* and react to them.
|
|
14
14
|
*/
|
|
15
|
-
type GridStateProps = Pick<
|
|
15
|
+
type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView'>;
|
|
16
16
|
/**
|
|
17
17
|
* The state of Data Grid.
|
|
18
18
|
*/
|
|
@@ -196,6 +196,11 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
|
|
|
196
196
|
* @default 150
|
|
197
197
|
*/
|
|
198
198
|
filterDebounceMs: number;
|
|
199
|
+
/**
|
|
200
|
+
* The milliseconds delay to wait after a keystroke before triggering filtering in the columns menu.
|
|
201
|
+
* @default 150
|
|
202
|
+
*/
|
|
203
|
+
columnFilterDebounceMs: number;
|
|
199
204
|
/**
|
|
200
205
|
* Sets the height in pixel of the column headers in the Data Grid.
|
|
201
206
|
* @default 56
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { roundToDecimalPlaces } from '@mui/x-internals/math';
|
|
@@ -138,5 +138,10 @@ export interface GridPipeProcessingPrivateApi {
|
|
|
138
138
|
* @param {GridPipeProcessorGroup} group The group to apply.
|
|
139
139
|
*/
|
|
140
140
|
requestPipeProcessorsApplication: (group: GridPipeProcessorGroup) => void;
|
|
141
|
+
/**
|
|
142
|
+
* Checks of there are any processors that have been updated and runs appliers for them.
|
|
143
|
+
* It is intended to be called in a useEffect in the top-level data grid hook (`useDataGridComponent`).
|
|
144
|
+
*/
|
|
145
|
+
runAppliersForPendingProcessors: () => void;
|
|
141
146
|
}
|
|
142
147
|
export {};
|