UNPKG

ag-grid-enterprise

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

33 lines (32 loc) 1.66 kB
import type { GridApi, IExpansionService, NamedBean, RowGroupExpansionState, RowGroupOpenedEvent, RowNode } from 'ag-grid-community'; import { BaseExpansionService } from './baseExpansionService'; export declare class ClientSideExpansionService extends BaseExpansionService implements NamedBean, IExpansionService<RowGroupExpansionState> { beanName: "expansionSvc"; private events; private dispatchExpandedDebounced; destroy(): void; setExpansionState(state: RowGroupExpansionState): void; private getInternalExpansionState; getExpansionState(): RowGroupExpansionState; isExpanded(rowNode: RowNode<any>): boolean; resetExpansion(): void; expandAll(expand: boolean): void; onGroupExpandedOrCollapsed(): void; setDetailsExpansionState(detailGridApi: GridApi): void; /** * because the user can call rowNode.setExpanded() many times in one VM turn, * we throttle the calls to ClientSideRowModel using animationFrameSvc. this means for 100 * row nodes getting expanded, we only update the CSRM once, and then we fire all events after * CSRM has updated. * * if we did not do this, then the user could call setExpanded on 100+ rows, causing the grid * to re-render 100+ times, which would be a performance lag. * * we use animationFrameService * rather than debounce() so this will get done if anyone flushes the animationFrameService * (eg user calls api.ensureRowVisible(), which in turn flushes ). */ protected dispatchExpandedEvent(event: RowGroupOpenedEvent, forceSync?: boolean): void; private dispatchExpandedEvents; private debounce; }