File tree 4 files changed +20
-9
lines changed
4 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,8 @@ class BootstrapTable extends Component {
167
167
export : column . props . export ,
168
168
expandable : column . props . expandable ,
169
169
index : i ,
170
- attrs : column . props . tdAttr
170
+ attrs : column . props . tdAttr ,
171
+ style : column . props . tdStyle
171
172
} ;
172
173
}
173
174
} ) ;
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ class TableBody extends Component {
106
106
onEdit = { this . handleEditCell }
107
107
width = { column . width }
108
108
onClick = { this . handleClickCell }
109
- attrs = { column . attrs } >
109
+ attrs = { column . attrs }
110
+ style = { column . style } >
110
111
{ columnChild }
111
112
</ TableColumn >
112
113
) ;
Original file line number Diff line number Diff line change @@ -76,12 +76,14 @@ class TableColumn extends Component {
76
76
dataAlign,
77
77
hidden,
78
78
cellEdit,
79
- attrs
79
+ attrs,
80
+ style
80
81
} = this . props ;
81
82
82
83
const tdStyle = {
83
84
textAlign : dataAlign ,
84
- display : hidden ? 'none' : null
85
+ display : hidden ? 'none' : null ,
86
+ ...style
85
87
} ;
86
88
87
89
const opts = { } ;
@@ -113,7 +115,8 @@ TableColumn.propTypes = {
113
115
columnTitle : PropTypes . string ,
114
116
children : PropTypes . node ,
115
117
onClick : PropTypes . func ,
116
- attrs : PropTypes . object
118
+ attrs : PropTypes . object ,
119
+ style : PropTypes . object
117
120
} ;
118
121
119
122
TableColumn . defaultProps = {
Original file line number Diff line number Diff line change @@ -96,11 +96,13 @@ class TableHeaderColumn extends Component {
96
96
children,
97
97
caretRender,
98
98
className,
99
- isOnlyHead
99
+ isOnlyHead,
100
+ thStyle : style
100
101
} = this . props ;
101
102
const thStyle = {
102
103
textAlign : headerAlign || dataAlign ,
103
- display : hidden ? 'none' : null
104
+ display : hidden ? 'none' : null ,
105
+ ...style
104
106
} ;
105
107
if ( ! isOnlyHead ) {
106
108
if ( sortIndicator ) {
@@ -259,7 +261,9 @@ TableHeaderColumn.propTypes = {
259
261
sortIndicator : PropTypes . bool ,
260
262
export : PropTypes . bool ,
261
263
expandable : PropTypes . bool ,
262
- tdAttr : PropTypes . object
264
+ tdAttr : PropTypes . object ,
265
+ tdStyle : PropTypes . Object ,
266
+ thStyle : PropTypes . Object
263
267
} ;
264
268
265
269
TableHeaderColumn . defaultProps = {
@@ -291,7 +295,9 @@ TableHeaderColumn.defaultProps = {
291
295
filter : undefined ,
292
296
sortIndicator : true ,
293
297
expandable : true ,
294
- tdAttr : undefined
298
+ tdAttr : undefined ,
299
+ tdStyle : undefined ,
300
+ thStyle : undefined
295
301
} ;
296
302
297
303
export default TableHeaderColumn ;
You can’t perform that action at this time.
0 commit comments