Files
madbase/control-plane-ui/node_modules/@mui/x-data-grid/hooks/features/dimensions/gridDimensionsApi.d.ts
Vlad Durnea cffdf8af86
Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped
wip:milestone 0 fixes
2026-03-15 12:35:42 +02:00

51 lines
1.6 KiB
TypeScript

import type { ElementSize } from '../../../models/elementSize';
export interface GridDimensions {
/**
* The viewport size including scrollbars.
*/
viewportOuterSize: ElementSize;
/**
* The viewport size not including scrollbars.
*/
viewportInnerSize: ElementSize;
/**
* Indicates if a scroll is currently needed to go from the beginning of the first column to the end of the last column.
*/
hasScrollX: boolean;
/**
* Indicates if a scroll is currently needed to go from the beginning of the first row to the end of the last row.
*/
hasScrollY: boolean;
/**
* Size of the scrollbar used to scroll the rows in pixel.
* It is defined even when the scrollbar is currently not needed.
*/
scrollBarSize: number;
}
export interface GridDimensionsApi {
/**
* Triggers a resize of the component and recalculation of width and height.
*/
resize: () => void;
/**
* Returns the dimensions of the grid
* @returns {GridDimensions | null} The dimension information of the grid. If `null`, the grid is not ready yet.
*/
getRootDimensions: () => GridDimensions | null;
}
export interface GridDimensionsPrivateApi {
/**
* Returns the amount of rows that are currently visible in the viewport
* @returns {number} The amount of rows visible in the viewport
*/
getViewportPageSize: () => number;
/**
* Forces a recalculation of all dimensions.
*/
updateGridDimensionsRef: () => void;
/**
* Computes the size and publishes a `resize` event with the new value.
*/
computeSizeAndPublishResizeEvent: () => void;
}