-
Notifications
You must be signed in to change notification settings - Fork 948
/
Column.js
155 lines (152 loc) · 5.04 KB
/
Column.js
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import { Component } from 'react';
import PropTypes from 'prop-types';
export class Column extends Component {
static defaultProps = {
columnKey: null,
field: null,
sortField: null,
filterField: null,
header: null,
body: null,
footer: null,
sortable: false,
sortableDisabled: false,
sortFunction: null,
dataType: 'text',
filter: false,
filterMatchMode: null,
filterPlaceholder: null,
filterType: 'text',
filterMaxLength: null,
filterElement: null,
filterFunction: null,
filterHeaderStyle: null,
filterHeaderClassName: null,
showFilterMenu: true,
showFilterOperator: true,
showClearButton: true,
showApplyButton: true,
showFilterMatchModes: true,
showFilterMenuOptions: true,
showAddButton: true,
filterMatchModeOptions: null,
maxConstraints: 2,
filterMenuClassName: null,
filterMenuStyle: null,
align: null,
alignHeader: null,
alignFrozen: 'left',
hidden: false,
onFilterClear: null,
onFilterApplyClick: null,
onFilterMatchModeChange: null,
onFilterOperatorChange: null,
onFilterConstraintAdd: null,
onFilterConstraintRemove: null,
filterClear: null,
filterApply: null,
filterHeader: null,
filterFooter: null,
style: null,
className: null,
headerStyle: null,
headerClassName: null,
bodyStyle: null,
bodyClassName: null,
footerStyle: null,
footerClassName: null,
expander: false,
frozen: false,
selectionMode: null,
colSpan: null,
rowSpan: null,
editor: null,
cellEditValidator: null,
cellEditValidatorEvent: 'click',
onBeforeCellEditHide: null,
onBeforeCellEditShow: null,
onCellEditInit: null,
onCellEditComplete: null,
onCellEditCancel: null,
excludeGlobalFilter: false,
rowReorder: false,
rowReorderIcon: 'pi pi-bars',
rowEditor: false,
exportable: true,
reorderable: true
}
static propTypes = {
columnKey: PropTypes.string,
field: PropTypes.string,
sortField: PropTypes.string,
filterField: PropTypes.string,
header: PropTypes.any,
body: PropTypes.any,
footer: PropTypes.any,
sortable: PropTypes.bool,
sortableDisabled: PropTypes.bool,
sortFunction: PropTypes.func,
dataType: PropTypes.string,
filter: PropTypes.bool,
filterMatchMode: PropTypes.string,
filterPlaceholder: PropTypes.string,
filterType: PropTypes.string,
filterMaxLength: PropTypes.number,
filterElement: PropTypes.any,
filterFunction: PropTypes.func,
filterHeaderStyle: PropTypes.object,
filterHeaderClassName: PropTypes.string,
showFilterMenu: PropTypes.bool,
showFilterOperator: PropTypes.bool,
showClearButton: PropTypes.bool,
showApplyButton: PropTypes.bool,
showFilterMatchModes: PropTypes.bool,
showFilterMenuOptions: PropTypes.bool,
showAddButton: PropTypes.bool,
filterMatchModeOptions: PropTypes.any,
maxConstraints: PropTypes.number,
filterMenuClassName: PropTypes.string,
filterMenuStyle: PropTypes.object,
align: PropTypes.string,
alignHeader: PropTypes.string,
alignFrozen: PropTypes.string,
hidden: PropTypes.bool,
onFilterClear: PropTypes.func,
onFilterApplyClick: PropTypes.func,
onFilterMatchModeChange: PropTypes.func,
onFilterOperatorChange: PropTypes.func,
onFilterConstraintAdd: PropTypes.func,
onFilterConstraintRemove: PropTypes.func,
filterClear: PropTypes.any,
filterApply: PropTypes.any,
filterHeader: PropTypes.any,
filterFooter: PropTypes.any,
style: PropTypes.object,
className: PropTypes.string,
headerStyle: PropTypes.object,
headerClassName: PropTypes.string,
bodyStyle: PropTypes.object,
bodyClassName: PropTypes.string,
footerStyle: PropTypes.object,
footerClassName: PropTypes.string,
expander: PropTypes.bool,
frozen: PropTypes.bool,
selectionMode: PropTypes.string,
colSpan: PropTypes.number,
rowSpan: PropTypes.number,
editor: PropTypes.func,
cellEditValidator: PropTypes.func,
cellEditValidatorEvent: PropTypes.string,
onBeforeCellEditHide: PropTypes.func,
onBeforeCellEditShow: PropTypes.func,
onCellEditInit: PropTypes.func,
onCellEditComplete: PropTypes.func,
onCellEditCancel: PropTypes.func,
excludeGlobalFilter: PropTypes.bool,
rowReorder: PropTypes.bool,
rowReorderIcon: PropTypes.string,
rowEditor: PropTypes.bool,
exportable: PropTypes.bool,
reorderable: PropTypes.bool
}
}