ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
29 lines (28 loc) • 1.57 kB
TypeScript
import type { BeanCollection } from '../context/context';
import type { RowNode } from '../entities/rowNode';
import type { RowPinnedType } from '../interfaces/iRowNode';
export declare class PinnedRows {
private readonly beans;
readonly floating: NonNullable<RowPinnedType>;
/** Canonical set of pinned nodes, hidden ones included, in pin order. Mutate only via methods. */
readonly all: Set<RowNode<any>>;
/** The subset of `all` hidden by a filter, pivot mode or the SSRM cache, usually empty. */
private readonly hidden;
/** IDs of nodes that need to be pinned once they are available from the row model */
readonly queued: Set<string>;
private readonly sorted;
private sortedValid;
constructor(beans: BeanCollection, floating: NonNullable<RowPinnedType>);
getDisplayedCount(): number;
/** The displayed nodes in display order, re-sorted in place on the first read after a change. */
getSorted(): RowNode[];
add(node: RowNode, hidden: boolean): void;
delete(item: RowNode): void;
getById(id: string): RowNode | undefined;
/** Re-evaluates visibility and invalidates the display order, which the source rows' sort and index drive.
* Returns whether any row was hidden or revealed; a swap leaves the count unchanged. */
refreshVisibility(): boolean;
}
/** Expect to be passed the source node, not the pinned node */
export declare const _shouldHidePinnedRows: (beans: BeanCollection, node: RowNode) => boolean;
export declare const _isPinnedNodeGrandTotal: (node: RowNode) => boolean;