quill-component-library
Version:
A library for components shared between Quill apps.
71 lines (70 loc) • 2.28 kB
TypeScript
import * as React from 'react';
import * as CSS from 'csstype';
export declare const descending = "desc";
export declare const ascending = "asc";
interface DataTableRow {
id: number | string;
actions?: Array<{
name: string;
action: Function;
}>;
[key: string]: any;
}
interface DataTableHeader {
width: string;
name: string;
attribute: string;
rowSectionClassName?: string;
headerClassName?: string;
isSortable?: boolean;
}
interface DataTableProps {
headers: Array<DataTableHeader>;
rows: Array<DataTableRow>;
averageFontWidth?: number;
className?: string;
defaultSortAttribute?: string;
defaultSortDirection?: string;
showCheckboxes?: boolean;
showRemoveIcon?: boolean;
showActions?: boolean;
removeRow?: (event: any) => void;
checkRow?: (event: any) => void;
uncheckRow?: (event: any) => void;
uncheckAllRows?: (event: any) => void;
checkAllRows?: (event: any) => void;
}
interface DataTableState {
sortAttribute?: string;
sortAscending?: boolean;
rowWithActionsOpen?: number | string;
}
export declare class DataTable extends React.Component<DataTableProps, DataTableState> {
private selectedStudentActions;
static defaultProps: {
averageFontWidth: number;
};
constructor(props: any);
componentWillMount(): void;
componentWillUnmount(): void;
handleClick(e: any): void;
attributeAlignment(attributeName: any): CSS.TextAlignProperty;
changeSortDirection(): void;
sortRows(): DataTableRow[];
clickAction(action: any, id: any): void;
renderHeaderCheckbox(): JSX.Element;
renderHeaderForRemoval(): JSX.Element;
renderActionsHeader(): JSX.Element;
renderRowCheckbox(row: any): JSX.Element;
renderRowRemoveIcon(row: any): JSX.Element;
renderActions(row: any): JSX.Element;
renderOpenActions(row: any): JSX.Element;
renderClosedActions(row: any): JSX.Element;
renderHeader(header: any): JSX.Element;
renderHeaders(): JSX.Element;
renderRowSection(row: any, header: any): JSX.Element;
renderRow(row: any): JSX.Element;
renderRows(): JSX.Element;
render(): JSX.Element;
}
export {};