ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
49 lines (48 loc) • 2.66 kB
TypeScript
import type { NamedBean } from '../../context/bean';
import { BeanStub } from '../../context/beanStub';
import type { BeanCollection } from '../../context/context';
import type { RowNode } from '../../entities/rowNode';
import type { CellCtrl } from '../cell/cellCtrl';
/** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */
export declare class RowAutoHeightService extends BeanStub implements NamedBean {
beanName: "rowAutoHeight";
private visibleCols;
wireBeans(beans: BeanCollection): void;
/** A displayed column has `colDef.autoHeight`. */
get active(): boolean;
/** A cell was measured since the last pass without auto-height columns, so that pass gives rows their height back. */
private measured;
/** Requests a refresh of the row heights once a cell has been measured. */
requestCheckAutoHeight(): void;
private readonly _debouncedCalculateRowHeights;
private calculateRowHeights;
/** Gives every row auto height sized its configured height back, rows out of view included. */
private releaseRowHeights;
/**
* The height auto height gives `row`, its content height raised to the configured one: measured, or for a row out
* of view the one it was last sized to. Undefined with no auto-height column displayed or nothing to go on.
*/
getMeasuredRowHeight(row: RowNode): number | undefined;
/** The height the auto-height cells of `row` need, undefined while one of them is unmeasured. */
private getRowContentHeight;
/**
* Set the cell height into the row node, and request a refresh of the row heights if there's been a change.
* @param rowNode the node to set the auto height on
* @param cellHeight the height to set, undefined if the cell has just been destroyed
* @param column the column of the cell
*/
private setRowAutoHeight;
/**
* If required, sets up observers to continuously measure changes in the cell height.
* @param cellCtrl the cellCtrl of the cell
* @param eCellWrapper the HTMLElement to track the height of
* @param compBean the component bean to add the destroy/cleanup function to
* @returns whether or not auto height has been set up on this cell
*/
setupCellAutoHeight(cellCtrl: CellCtrl, eCellWrapper: HTMLElement | undefined, compBean: BeanStub): boolean;
/**
* @returns true if every rendered row is at least as tall as its centre auto-height cells, or no auto-height
* column is displayed. A row span counts on its last row, against the share of its height that row carries.
*/
areRowsMeasured(): boolean;
}