File tree Expand file tree Collapse file tree 1 file changed +23
-7
lines changed
components/dash-table/src/dash-table/components/ControlledTable Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -786,6 +786,25 @@ export default class ControlledTable extends PureComponent<ControlledTableProps>
786
786
} ) ;
787
787
} ;
788
788
789
+ getColumnRef ( rowIndex : number , colIndex : number ) {
790
+ if ( rowIndex === 0 ) {
791
+ if ( colIndex === 0 ) {
792
+ return this . tableRefs . r0c0 ;
793
+ }
794
+ if ( colIndex === 1 ) {
795
+ return this . tableRefs . r0c1 ;
796
+ }
797
+ }
798
+ if ( rowIndex == 1 ) {
799
+ if ( colIndex === 0 ) {
800
+ return this . tableRefs . r1c0 ;
801
+ }
802
+ if ( colIndex === 1 ) {
803
+ return this . tableRefs . r1c1 ;
804
+ }
805
+ }
806
+ }
807
+
789
808
getNextCell = ( event : any , { restrictToSelection, currentCell} : any ) => {
790
809
const { selected_cells, viewport, visibleColumns} = this . props ;
791
810
@@ -1078,13 +1097,10 @@ export default class ControlledTable extends PureComponent<ControlledTableProps>
1078
1097
key = { columnIndex }
1079
1098
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1080
1099
// @ts -ignore
1081
- ref = {
1082
- rowIndex < 2 && columnIndex < 2
1083
- ? this . tableRefs [
1084
- `r${ rowIndex } c${ columnIndex } `
1085
- ]
1086
- : undefined
1087
- }
1100
+ ref = { this . getColumnRef (
1101
+ rowIndex ,
1102
+ columnIndex
1103
+ ) }
1088
1104
className = { `cell cell-${ rowIndex } -${ columnIndex } ${ c } ` }
1089
1105
>
1090
1106
{ g
You can’t perform that action at this time.
0 commit comments