@@ -497,7 +497,7 @@ export const TableHeader = /*#__PURE__*/ createBranchComponent(
497
497
}
498
498
} , [ ] )
499
499
} ) ;
500
-
500
+
501
501
let { rowGroupProps} = useTableRowGroup ( ) ;
502
502
return (
503
503
< thead
@@ -792,6 +792,7 @@ function ColumnResizer(props: ColumnResizerProps, ref: ForwardedRef<HTMLDivEleme
792
792
< div
793
793
ref = { objectRef }
794
794
role = "presentation"
795
+ { ...filterDOMProps ( props as any ) }
795
796
{ ...renderProps }
796
797
{ ...mergeProps ( resizerProps , { onPointerDown} , hoverProps ) }
797
798
data-hovered = { isHovered || undefined }
@@ -876,7 +877,10 @@ export const TableBody = /*#__PURE__*/ createBranchComponent('tablebody', <T ext
876
877
) ;
877
878
} ) ;
878
879
879
- export interface RowRenderProps extends ItemRenderProps { }
880
+ export interface RowRenderProps extends ItemRenderProps {
881
+ /** Whether the row's children have keyboard focus. */
882
+ isFocusVisibleWithin : boolean
883
+ }
880
884
881
885
export interface RowProps < T > extends StyleRenderProps < RowRenderProps > , LinkDOMProps , HoverEvents {
882
886
/** The unique id of the row. */
@@ -918,23 +922,27 @@ export const Row = /*#__PURE__*/ createBranchComponent(
918
922
ref
919
923
) ;
920
924
let { isFocused, isFocusVisible, focusProps} = useFocusRing ( ) ;
925
+ let {
926
+ isFocusVisible : isFocusVisibleWithin ,
927
+ focusProps : focusWithinProps
928
+ } = useFocusRing ( { within : true } ) ;
921
929
let { hoverProps, isHovered} = useHover ( {
922
930
isDisabled : ! states . allowsSelection && ! states . hasAction ,
923
931
onHoverStart : props . onHoverStart ,
924
932
onHoverChange : props . onHoverChange ,
925
933
onHoverEnd : props . onHoverEnd
926
934
} ) ;
927
-
935
+
928
936
let { checkboxProps} = useTableSelectionCheckbox (
929
937
{ key : item . key } ,
930
938
state
931
939
) ;
932
-
940
+
933
941
let draggableItem : DraggableItemResult | undefined = undefined ;
934
942
if ( dragState && dragAndDropHooks ) {
935
943
draggableItem = dragAndDropHooks . useDraggableItem ! ( { key : item . key , hasDragButton : true } , dragState ) ;
936
944
}
937
-
945
+
938
946
let dropIndicator : DropIndicatorAria | undefined = undefined ;
939
947
let dropIndicatorRef = useRef < HTMLDivElement > ( null ) ;
940
948
let { visuallyHiddenProps} = useVisuallyHidden ( ) ;
@@ -943,7 +951,7 @@ export const Row = /*#__PURE__*/ createBranchComponent(
943
951
target : { type : 'item' , key : item . key , dropPosition : 'on' }
944
952
} , dropState , dropIndicatorRef ) ;
945
953
}
946
-
954
+
947
955
let renderDropIndicator = dragAndDropHooks ?. renderDropIndicator || ( target => < DropIndicator target = { target } /> ) ;
948
956
let dragButtonRef = useRef < HTMLButtonElement > ( null ) ;
949
957
useEffect ( ( ) => {
@@ -952,7 +960,7 @@ export const Row = /*#__PURE__*/ createBranchComponent(
952
960
}
953
961
// eslint-disable-next-line
954
962
} , [ ] ) ;
955
-
963
+
956
964
let isDragging = dragState && dragState . isDragging ( item . key ) ;
957
965
// eslint-disable-next-line @typescript-eslint/no-unused-vars
958
966
let { children : _ , ...restProps } = props ;
@@ -968,10 +976,11 @@ export const Row = /*#__PURE__*/ createBranchComponent(
968
976
selectionMode : state . selectionManager . selectionMode ,
969
977
selectionBehavior : state . selectionManager . selectionBehavior ,
970
978
isDragging,
971
- isDropTarget : dropIndicator ?. isDropTarget
979
+ isDropTarget : dropIndicator ?. isDropTarget ,
980
+ isFocusVisibleWithin
972
981
}
973
982
} ) ;
974
-
983
+
975
984
return (
976
985
< >
977
986
{ dragAndDropHooks ?. useDropIndicator &&
@@ -985,7 +994,7 @@ export const Row = /*#__PURE__*/ createBranchComponent(
985
994
</ tr >
986
995
) }
987
996
< tr
988
- { ...mergeProps ( filterDOMProps ( props as any ) , rowProps , focusProps , hoverProps , draggableItem ?. dragProps ) }
997
+ { ...mergeProps ( filterDOMProps ( props as any ) , rowProps , focusProps , hoverProps , draggableItem ?. dragProps , focusWithinProps ) }
989
998
{ ...renderProps }
990
999
ref = { ref }
991
1000
data-disabled = { states . isDisabled || undefined }
@@ -996,7 +1005,8 @@ export const Row = /*#__PURE__*/ createBranchComponent(
996
1005
data-pressed = { states . isPressed || undefined }
997
1006
data-dragging = { isDragging || undefined }
998
1007
data-drop-target = { dropIndicator ?. isDropTarget || undefined }
999
- data-selection-mode = { state . selectionManager . selectionMode === 'none' ? undefined : state . selectionManager . selectionMode } >
1008
+ data-selection-mode = { state . selectionManager . selectionMode === 'none' ? undefined : state . selectionManager . selectionMode }
1009
+ data-focus-visible-within = { isFocusVisibleWithin || undefined } >
1000
1010
< Provider
1001
1011
values = { [
1002
1012
[ CheckboxContext , {
0 commit comments