@@ -957,11 +957,12 @@ const UITable: FC<TableProps & IExtendableTable & IComponentConstants> = (props)
957
957
return selectNextCell ( true ) ;
958
958
}
959
959
else if ( navigationMode === Navigation . NAVIGATION_ROW_AND_FOCUS ) {
960
- selectNextRow ( true ) ;
960
+ return selectNextRow ( true ) ;
961
961
}
962
962
else if ( navigationMode === Navigation . NAVIGATION_CELL_AND_ROW_AND_FOCUS ) {
963
- selectNextCellAndRow ( true ) ;
963
+ return selectNextCellAndRow ( true ) ;
964
964
}
965
+ return true ;
965
966
}
966
967
} , [ selectNextCell , selectNextRow , selectNextCellAndRow ] ) ;
967
968
@@ -972,20 +973,31 @@ const UITable: FC<TableProps & IExtendableTable & IComponentConstants> = (props)
972
973
useEffect ( ( ) => {
973
974
selectPrevious . current = ( navigationMode :number , row ?:any ) => {
974
975
if ( navigationMode === Navigation . NAVIGATION_CELL_AND_FOCUS ) {
975
- selectPreviousCell ( true ) ;
976
+ return selectPreviousCell ( true ) ;
976
977
}
977
978
else if ( navigationMode === Navigation . NAVIGATION_ROW_AND_FOCUS ) {
978
- selectPreviousRow ( true ) ;
979
+ return selectPreviousRow ( true ) ;
979
980
}
980
981
else if ( navigationMode === Navigation . NAVIGATION_CELL_AND_ROW_AND_FOCUS ) {
981
- selectPreviousCellAndRow ( true )
982
+ return selectPreviousCellAndRow ( true ) ;
982
983
}
984
+ return true ;
983
985
}
984
986
} , [ selectPreviousCell , selectPreviousRow , selectPreviousCellAndRow ] ) ;
985
987
986
- const selectNextCallback = useCallback ( ( key : string ) => selectNext . current && selectNext . current ( key === "Enter" ? props . enterNavigationMode : props . tabNavigationMode ) , [ selectNext . current , props . enterNavigationMode , props . tabNavigationMode ] ) ;
988
+ const selectNextCallback = useCallback ( ( key : string ) => {
989
+ if ( selectNext . current ) {
990
+ return selectNext . current ( key === "Enter" ? enterNavigationMode : tabNavigationMode ) ;
991
+ }
992
+ return true ;
993
+ } , [ selectNext . current , enterNavigationMode , tabNavigationMode ] ) ;
987
994
988
- const selectPreviousCallback = useCallback ( ( key : string ) => selectPrevious . current && selectPrevious . current ( key === "Enter" ? props . enterNavigationMode : props . tabNavigationMode ) , [ selectPrevious . current , props . enterNavigationMode , props . tabNavigationMode ] ) ;
995
+ const selectPreviousCallback = useCallback ( ( key : string ) => {
996
+ if ( selectPrevious . current ) {
997
+ return selectPrevious . current ( key === "Enter" ? enterNavigationMode : tabNavigationMode ) ;
998
+ }
999
+ return true ;
1000
+ } , [ selectPrevious . current , enterNavigationMode , tabNavigationMode ] ) ;
989
1001
990
1002
/** Building the columns */
991
1003
const CellBody = useMemo ( ( ) => {
@@ -1040,7 +1052,7 @@ const UITable: FC<TableProps & IExtendableTable & IComponentConstants> = (props)
1040
1052
cellReadOnly = { rowData . __recordReadOnly && rowData . __recordReadOnly }
1041
1053
resource = { props . context . server . RESOURCE_URL }
1042
1054
cellId = { props . id + "-" + tableInfo . rowIndex . toString ( ) + "-" + colIndex . toString ( ) }
1043
- tableContainer = { props . forwardedRef . current ? props . forwardedRef . current : undefined }
1055
+ tableContainer = { props . forwardedRef . current }
1044
1056
selectNext = { selectNextCallback }
1045
1057
selectPrevious = { selectPreviousCallback }
1046
1058
className = { className }
@@ -1106,7 +1118,8 @@ const UITable: FC<TableProps & IExtendableTable & IComponentConstants> = (props)
1106
1118
props . dataBook ,
1107
1119
setMeasureFlag ,
1108
1120
providerData ,
1109
- props . startEditing
1121
+ props . startEditing ,
1122
+ props . forwardedRef . current
1110
1123
] )
1111
1124
1112
1125
const columns = useMemo ( ( ) => {
0 commit comments