UNPKG

@gooddata/react-components

Version:

GoodData.UI - A powerful JavaScript library for building analytical applications

47 lines (46 loc) 1.48 kB
import * as React from "react"; import { AFM, Execution } from "@gooddata/typings"; import { OnSortChangeWithItem, TableRow } from "../../../interfaces/Table"; import { ITotalWithData } from "../../../interfaces/Totals"; export interface IResponsiveTableProps { rows: TableRow[]; rowsPerPage: number; page?: number; pageOffset?: number; totalsWithData?: ITotalWithData[]; onMore?: (onMoreObj: { page: number; pageOffset: number; rows: number; }) => void; onLess?: (onLessObj: { rows: number; }) => void; onSortChange?: OnSortChangeWithItem; executionRequest: AFM.IExecution; executionResponse: Execution.IExecutionResponse; containerHeight?: number; } export interface IResponsiveTableState { page: number; pageOffset: number; } export declare class ResponsiveTable extends React.Component<IResponsiveTableProps, IResponsiveTableState> { static defaultProps: Partial<IResponsiveTableProps>; private table; constructor(props: IResponsiveTableProps); componentWillReceiveProps(nextProps: IResponsiveTableProps): void; render(): JSX.Element; private onMore; private onLess; private getBasePage; private getPage; private getRowCount; private getContainerHeight; private getContainerMaxHeight; private setTableRef; private isMoreButtonVisible; private isMoreButtonDisabled; private isLessButtonVisible; private hasHiddenRows; }