@@ -105,19 +105,19 @@ class TableColumn extends Component {
105105 style,
106106 isFocus,
107107 keyBoardNav,
108- tabIndex
108+ tabIndex,
109+ customNavStyle,
110+ row
109111 } = this . props ;
110112
111113 let { className } = this . props ;
112114
113- const tdStyle = {
115+ let tdStyle = {
114116 textAlign : dataAlign ,
115117 display : hidden ? 'none' : null ,
116118 ...style
117119 } ;
118120
119- className = isFocus ? `${ className } default-focus-cell` : className ;
120-
121121 const opts = { } ;
122122
123123 if ( cellEdit ) {
@@ -133,6 +133,19 @@ class TableColumn extends Component {
133133 if ( keyBoardNav && isFocus ) {
134134 opts . onKeyDown = this . handleKeyDown ;
135135 }
136+
137+ if ( isFocus ) {
138+ if ( customNavStyle ) {
139+ const cusmtStyle = typeof customNavStyle === 'function' ?
140+ customNavStyle ( children , row ) : customNavStyle ;
141+ tdStyle = {
142+ ...tdStyle ,
143+ ...cusmtStyle
144+ } ;
145+ } else {
146+ className = `${ className } default-focus-cell` ;
147+ }
148+ }
136149 return (
137150 < td tabIndex = { tabIndex } style = { tdStyle }
138151 title = { columnTitle }
@@ -156,7 +169,9 @@ TableColumn.propTypes = {
156169 isFocus : PropTypes . bool ,
157170 onKeyDown : PropTypes . func ,
158171 tabIndex : PropTypes . string ,
159- keyBoardNav : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . object ] )
172+ keyBoardNav : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . object ] ) ,
173+ customNavStyle : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . object ] ) ,
174+ row : PropTypes . any /* only used on custom styling for navigation */
160175} ;
161176
162177TableColumn . defaultProps = {
0 commit comments