File tree 1 file changed +15
-8
lines changed
1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -62,25 +62,32 @@ class TableColumn extends Component {
62
62
63
63
render ( ) {
64
64
const {
65
- children
65
+ children,
66
+ columnTitle,
67
+ className,
68
+ dataAlign,
69
+ hidden,
70
+ cellEdit
66
71
} = this . props ;
72
+
67
73
const tdStyle = {
68
- textAlign : this . props . dataAlign ,
69
- display : this . props . hidden ? 'none' : null
74
+ textAlign : dataAlign ,
75
+ display : hidden ? 'none' : null
70
76
} ;
71
77
72
78
const opts = { } ;
73
- if ( this . props . cellEdit ) {
74
- if ( this . props . cellEdit . mode === Const . CELL_EDIT_CLICK ) {
79
+
80
+ if ( cellEdit ) {
81
+ if ( cellEdit . mode === Const . CELL_EDIT_CLICK ) {
75
82
opts . onClick = this . handleCellEdit ;
76
- } else if ( this . props . cellEdit . mode === Const . CELL_EDIT_DBCLICK ) {
83
+ } else if ( cellEdit . mode === Const . CELL_EDIT_DBCLICK ) {
77
84
opts . onDoubleClick = this . handleCellEdit ;
78
85
}
79
86
}
80
87
return (
81
88
< td style = { tdStyle }
82
- title = { this . props . columnTitle }
83
- className = { this . props . className }
89
+ title = { columnTitle }
90
+ className = { className }
84
91
{ ...opts } >
85
92
{ typeof children === 'boolean' ? children . toString ( ) : children }
86
93
</ td >
You can’t perform that action at this time.
0 commit comments