File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ class TableHeaderColumn extends Component {
107
107
render ( ) {
108
108
let defaultCaret ;
109
109
let sortCaret ;
110
+ let sortClass ;
110
111
const {
111
112
headerText,
112
113
dataAlign,
@@ -122,6 +123,7 @@ class TableHeaderColumn extends Component {
122
123
className,
123
124
isOnlyHead,
124
125
version,
126
+ sortHeaderColumnClassName : customSortClass ,
125
127
thStyle : style
126
128
} = this . props ;
127
129
const thStyle = {
@@ -140,9 +142,14 @@ class TableHeaderColumn extends Component {
140
142
}
141
143
}
142
144
145
+ if ( sort ) {
146
+ sortClass = Util . isFunction ( customSortClass ) ?
147
+ customSortClass ( sort , dataField ) : customSortClass ;
148
+ }
143
149
const classes = classSet (
144
150
Util . isFunction ( className ) ? className ( ) : className ,
145
- ! isOnlyHead && dataSort ? 'sort-column' : '' ) ;
151
+ ! isOnlyHead && dataSort ? 'sort-column' : '' ,
152
+ sortClass ) ;
146
153
147
154
const attr = { } ;
148
155
if ( headerTitle ) {
@@ -255,6 +262,7 @@ TableHeaderColumn.propTypes = {
255
262
width : PropTypes . string ,
256
263
sortFunc : PropTypes . func ,
257
264
sortFuncExtraData : PropTypes . any ,
265
+ sortHeaderColumnClassName : PropTypes . any ,
258
266
columnClassName : PropTypes . any ,
259
267
editColumnClassName : PropTypes . any ,
260
268
invalidEditColumnClassName : PropTypes . any ,
You can’t perform that action at this time.
0 commit comments