UNPKG

@justjarethb/table-core

Version:

Fork of @tanstack/table-core with support for event listeners in different windows

22 lines (21 loc) 974 B
import { RowData, Cell, Row, Table } from '../types'; export interface CoreRow<TData extends RowData> { id: string; index: number; original: TData; depth: number; parentId?: string; _valuesCache: Record<string, unknown>; _uniqueValuesCache: Record<string, unknown>; getValue: <TValue>(columnId: string) => TValue; getUniqueValues: <TValue>(columnId: string) => TValue[]; renderValue: <TValue>(columnId: string) => TValue; subRows: Row<TData>[]; getLeafRows: () => Row<TData>[]; originalSubRows?: TData[]; getAllCells: () => Cell<TData, unknown>[]; _getAllCellsByColumnId: () => Record<string, Cell<TData, unknown>>; getParentRow: () => Row<TData> | undefined; getParentRows: () => Row<TData>[]; } export declare const createRow: <TData extends unknown>(table: Table<TData>, id: string, original: TData, rowIndex: number, depth: number, subRows?: Row<TData>[] | undefined, parentId?: string) => Row<TData>;