UNPKG

@velis/dynamicforms

Version:

Data entry boilerplate components and a RESTful API consumer

27 lines 1.02 kB
import { APIConsumer } from '../../api_consumer/namespace'; import { DfTable } from '../namespace'; import TableRow from './row'; export default class TableRows { logic: APIConsumer.ConsumerLogicBaseInterface; visibilityHandler: (rowPk?: number) => boolean | { callback: (isVisible: boolean) => void; once?: boolean; }; next: string | null; rows: TableRow[]; rowIndices: { [key: string]: number; }; constructor(logic: APIConsumer.ConsumerLogicBaseInterface, rowsData: DfTable.RowsData); replaceRows(rowsData: DfTable.RowsData): void; get data(): TableRow[]; /** * Creates a visibilityHandler on first and last row so that we can trigger loading new rows when they come in view */ decorate(newRows: DfTable.RowDataInterface[]): void; loadMoreRows(isVisible: boolean): Promise<void>; updateRows(newRows: DfTable.RowDataInterface[]): void; reIndex(): void; deleteRow(tableRowId: string): void; } //# sourceMappingURL=rows.d.ts.map