forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact-bootstrap-table.d.ts
115 lines (103 loc) · 2.68 KB
/
react-bootstrap-table.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// Type definitions for react-bootstrap-table v1.4.6
// Project: https://github.com/AllenFang/react-bootstrap-table
// Definitions by: Frank Laub <https://github.com/flaub>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../react/react.d.ts" />
/// <reference path="../node/node.d.ts" />
declare module "react-bootstrap-table" {
import { ComponentClass, Props, ReactElement } from 'react';
import { EventEmitter } from 'events';
interface SelectRow {
mode?: string;
bgColor?: string;
selected?: any[];
onSelect?: Function;
onSelectAll?: Function;
clickToSelect?: boolean;
hideSelectColumn?: boolean;
clickToSelectAndEditCell?: boolean;
showOnlySelected?: boolean;
}
interface CellEdit {
mode?: string;
blurToSave?: boolean;
afterSaveCell?: Function;
}
interface Options {
sortName?: string;
sortOrder?: string;
afterTableComplete?: Function;
afterDeleteRow?: Function;
afterInsertRow?: Function;
afterSearch?: Function;
afterColumnFilter?: Function;
onRowClick?: Function;
page?: number;
sizePerPageList?: number[];
sizePerPage?: number;
paginationSize?: number;
onSortChange?: Function;
onPageChange?: Function;
onSizePerPageList?: Function;
noDataText?: string;
handleConfirmDeleteRow?: Function;
}
interface FetchInfo {
dataTotalSize?: number;
}
interface BootstrapTableProps extends Props<BootstrapTable> {
keyField?: string;
height?: string;
maxHeight?: string;
data?: any;
remote?: boolean;
striped?: boolean;
bordered?: boolean;
hover?: boolean;
condensed?: boolean;
pagination?: boolean;
searchPlaceholder?: string;
selectRow?: SelectRow;
cellEdit?: CellEdit;
insertRow?: boolean;
deleteRow?: boolean;
search?: boolean;
columnFilter?: boolean;
trClassName?: any;
options?: Options;
fetchInfo?: FetchInfo;
exportCSV?: boolean;
csvFileName?: string;
}
interface BootstrapTable extends ComponentClass<BootstrapTableProps> { }
const BootstrapTable: BootstrapTable;
interface TableHeaderColumnProps extends Props<TableHeaderColumn> {
dataField?: string;
dataAlign?: string;
dataSort?: boolean;
onSort?: Function;
dataFormat?: Function;
isKey?: boolean;
editable?: any;
hidden?: boolean;
className?: string;
width?: string;
sortFunc?: Function;
columnClassName?: any;
filterFormatted?: boolean;
sort?: string;
}
interface TableHeaderColumn extends ComponentClass<TableHeaderColumnProps> { }
const TableHeaderColumn: TableHeaderColumn;
class TableDataSet extends EventEmitter {
constructor(data: any);
setData(data: any): void;
clear(): void;
getData(): any;
}
export {
BootstrapTable,
TableHeaderColumn,
TableDataSet
}
}