@mui/x-data-grid-pro
Version:
The Pro plan edition of the MUI X Data Grid components.
30 lines • 1.16 kB
TypeScript
import { RefObject } from '@mui/x-internals/types';
import { GridKeyValue, GridRowId, GridRowTreeConfig } from '@mui/x-data-grid';
import { 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[]) => 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[];