-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
ts-react-json-table.d.ts
48 lines (44 loc) · 1.1 KB
/
ts-react-json-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
interface TableSettings{
header?: boolean,
classPrefix?: string,
noRowsMessage?: string,
cellClass?: Function,
headerClass?: Function,
keyField?: string,
rowClass?: Function,
cellRenderer?: Function
freezeHeader?: boolean
fixedHeader?: boolean
}
interface TableProps{
rows: any[],
columns?: ColumnSetting[],
columnDefinitions?: ColumnSetting[],
excludeColumns?: string[],
className?: string,
theadClassName?: string,
caption?: string,
settings?: TableSettings,
onClickCell?: Function,
onClickHeader?: Function,
onClickRow?: Function,
}
interface ColumnSetting{
key: string,
label?: string,
cell?: Function | string,
group?: string,
objectDisplayStyle?: string
}
// declare enum ObjectDisplayStyle {
// string = "string",
// json = "json",
// jsonSpaced = "jsonSpaced",
// flatJson = "flatJson",
// flatJsonSpaced = "flatJsonSpaced",
// }
declare module 'ts-react-json-table'{
import * as React from 'react';
class JsonTable extends React.Component<TableProps, {}>{}
export = JsonTable;
}