@mui/x-data-grid-pro
Version:
The Pro plan edition of the Data Grid components (MUI X).
30 lines (29 loc) • 1.12 kB
TypeScript
import { GridRowId } from '@mui/x-data-grid';
import { GridPrivateApiPro } from '../../../models/gridApiPro';
export declare const runIfServerMode: (modeProp: "server" | "client", fn: Function) => () => void;
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: React.MutableRefObject<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;
}