import { ItemMetadata } from "./column"; import { EventEmitter, EventData } from "./event"; import { Group, IGroupTotals } from "./group"; export interface IDataView { /** Gets the grand totals for all aggregated data. */ getGrandTotals(): IGroupTotals; /** Gets the total number of rows in the view. */ getLength(): number; /** Gets the item at the specified row index. */ getItem(row: number): (TItem | Group | IGroupTotals); /** Gets metadata for the item at the specified row index. */ getItemMetadata?(row: number): ItemMetadata; /** Event fired when the underlying data changes */ readonly onDataChanged?: EventEmitter<{}>; /** Event fired when the row count changes */ readonly onRowCountChanged?: EventEmitter<{ previous: number; current: number }>; /** Event fired when specific rows change */ readonly onRowsChanged?: EventEmitter<{ rows: number[] }>; }