@@ -6,6 +6,7 @@ import ArrowKeyStepper from './ArrowKeyStepper'
66import AutoSizer from '../AutoSizer'
77import Grid from '../Grid'
88import shouldPureComponentUpdate from 'react-pure-render/function'
9+ import cn from 'classnames'
910import styles from './ArrowKeyStepper.example.css'
1011
1112export default class ArrowKeyStepperExample extends Component {
@@ -61,7 +62,7 @@ export default class ArrowKeyStepperExample extends Component {
6162 columnsCount = { 100 }
6263 height = { 200 }
6364 onSectionRendered = { onSectionRendered }
64- renderCell = { this . _renderCell }
65+ renderCell = { ( { columnIndex , rowIndex } ) => this . _renderCell ( { columnIndex , rowIndex , scrollToColumn , scrollToRow } ) }
6566 rowHeight = { this . _getRowHeight }
6667 rowsCount = { 100 }
6768 scrollToColumn = { scrollToColumn }
@@ -85,10 +86,10 @@ export default class ArrowKeyStepperExample extends Component {
8586 return ( 1 + ( index % 3 ) ) * 30
8687 }
8788
88- _renderCell ( { columnIndex, rowIndex } ) {
89- const className = rowIndex % 2 === 0
90- ? columnIndex % 2 === 0 ? styles . EvenCell : styles . OddCell
91- : columnIndex % 2 !== 0 ? styles . EvenCell : styles . OddCell
89+ _renderCell ( { columnIndex, rowIndex, scrollToColumn , scrollToRow } ) {
90+ const className = cn ( styles . Cell , {
91+ [ styles . FocusedCell ] : columnIndex === scrollToColumn && rowIndex === scrollToRow
92+ } )
9293
9394 return (
9495 < div className = { className } >
0 commit comments