UNPKG

@mui/x-data-grid-pro

Version:

The Pro plan edition of the MUI X Data Grid components.

32 lines 1.23 kB
import type { RefObject } from '@mui/x-internals/types'; import { type GridKeyValue, type GridRowId, type GridRowTreeConfig } from '@mui/x-data-grid'; import type { GridPrivateApiPro } from "../../../models/index.js"; export declare enum RequestStatus { QUEUED = 0, PENDING = 1, SETTLED = 2, UNKNOWN = 3, } /** * Fetches row children from the server with option to limit the number of concurrent requests * Determines the status of a request based on the enum `RequestStatus` * Uses `GridRowId` to uniquely identify a request */ export declare class NestedDataManager { private pendingRequests; private queuedRequests; private settledRequests; private api; private maxConcurrentRequests; constructor(privateApiRef: RefObject<GridPrivateApiPro>, maxConcurrentRequests?: number); private processQueue; queue: (ids: GridRowId[], options?: { showChildrenLoading?: boolean; }) => Promise<void>; setRequestSettled: (id: GridRowId) => void; clear: () => void; clearPendingRequest: (id: GridRowId) => void; getRequestStatus: (id: GridRowId) => RequestStatus; getActiveRequestsCount: () => number; } export declare const getGroupKeys: (tree: GridRowTreeConfig, rowId: GridRowId) => GridKeyValue[];