API REFERENCE
GridRendererDiscovery
Fields, allowed values, and APIs that use GridRendererDiscovery.
Type definition
A question mark (?) marks an optional field; readonly marks a value you should not change directly. A union (|) accepts one of the listed forms. Functions are callbacks that Grid invokes at the relevant point.
export type GridRendererDiscovery<
TRow = Record<string, unknown>,
TValue = unknown,
TContext = unknown,
> =
| {
readonly status: 'mounted';
readonly key: string;
readonly identity: GridRendererCellIdentity;
readonly generation: number;
readonly host: GridRendererHost;
readonly instance: GridRendererInstance<TRow, TValue, TContext>;
readonly gui: GridRendererGui;
readonly params: GridRendererParams<TRow, TValue, TContext>;
}
| {
readonly status: 'logical-offscreen';
readonly key: string;
readonly identity: GridRendererCellIdentity;
readonly lastGeneration?: number;
}
| {
readonly status: 'unavailable';
readonly key: string;
}
| {
readonly status: 'stale';
readonly key: string;
readonly requestedGeneration: number;
readonly currentGeneration?: number;
};APIs using this type
- getCellRendererInstance
Queries mounted cell renderer instances. Offscreen cells may be unmounted because of virtualization.