doj-react-adminlte
Version:
Simple and easy-to-use AdminLTE components for React
60 lines (54 loc) • 1.61 kB
TypeScript
import * as React from 'react';
export interface DataTableColumnDefs {
header?: string;
renderValue?: string | ((...args: any[])=>any);
}
export interface DataTableProps {
/**
* It sets the data inside the Table Body.
*/
bodyRenderer?: (...args: any[])=>any;
/**
* className gets and sets the value of the class attribute of the specified element. You can also add a CSS class in this prop to style a particular element.
*/
className?: string;
/**
* It sets a column definition properties.
*/
columnDefs?: DataTableColumnDefs[];
/**
* You can set the data of the table by passing an array or object in this prop.
*/
data?: Object[];
/**
* The message that will be shown when there's no data in the table.
*/
emptyMessage?: string;
/**
* You can add an extra user-defined props by binding it in this prop.
*/
extra?: Object;
/**
* It sets the data inside the Footer Body.
*/
footRenderer?: (...args: any[])=>any;
/**
* It sets the identifier key of the Table.
*/
identifierKey?: string;
/**
* Function to invoke when a row is clicked.
*/
onRowClick?: (...args: any[])=>any;
/**
* Set to true so that the empty message will be shown.
*/
showEmptyMessageRow?: boolean;
/**
* The className of the table.
*/
tableClassName?: string;
}
export default class DataTable extends React.Component<DataTableProps, any> {
render(): JSX.Element;
}