UNPKG

@gooddata/react-components

Version:

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

44 lines (43 loc) 1.81 kB
import * as React from "react"; import * as PropTypes from "prop-types"; import { IHeaderParams } from "ag-grid-community"; import { AFM, Execution } from "@gooddata/typings"; import { IntlShape } from "react-intl"; import { IMenu, IMenuAggregationClickConfig } from "../../../interfaces/PivotTable"; export interface IColumnHeaderProps extends IHeaderParams { menu?: IMenu; getColumnTotals?: () => AFM.ITotalItem[]; getExecutionResponse?: () => Execution.IExecutionResponse; onMenuAggregationClick?: (config: IMenuAggregationClickConfig) => void; getAfmFilters: () => AFM.CompatibilityFilter[]; intl?: IntlShape; } export interface IColumnHeaderState { sorting?: AFM.SortDirection; } export declare const ASC: AFM.SortDirection; export declare const DESC: AFM.SortDirection; declare class ColumnHeader extends React.Component<IColumnHeaderProps, IColumnHeaderState> { static propTypes: { menu: PropTypes.Requireable<any>; getColumnTotals: PropTypes.Requireable<any>; getExecutionResponse: PropTypes.Requireable<any>; onMenuAggregationClick: PropTypes.Requireable<any>; intl: PropTypes.Requireable<any>; enableSorting: PropTypes.Requireable<any>; displayName: PropTypes.Requireable<any>; column: PropTypes.Requireable<any>; reactContainer: PropTypes.Requireable<any>; showColumnMenu: PropTypes.Requireable<any>; setSort: PropTypes.Requireable<any>; }; state: IColumnHeaderState; componentWillMount(): void; componentWillUnmount(): void; getCurrentSortDirection: () => void; getDefaultSortDirection(): AFM.SortDirection; onSortRequested: (sortDir: AFM.SortDirection) => void; render(): JSX.Element; private getFieldType; } export default ColumnHeader;