@@ -14,10 +14,11 @@ import {Breadcrumb as AriaBreadcrumb, BreadcrumbsProps as AriaBreadcrumbsProps,
14
14
import { AriaBreadcrumbItemProps , useLocale } from 'react-aria' ;
15
15
import ChevronIcon from '../ui-icons/Chevron' ;
16
16
import { createContext , forwardRef , ReactNode , useRef } from 'react' ;
17
- import { DOMRefValue , LinkDOMProps } from '@react-types/shared' ;
17
+ import { DOMRef , DOMRefValue , LinkDOMProps } from '@react-types/shared' ;
18
18
import { focusRing , getAllowedOverrides , StyleProps } from './style-utils' with { type : 'macro' } ;
19
19
import { forwardRefType } from './types' ;
20
20
import { size , style } from '../style/spectrum-theme' with { type : 'macro' } ;
21
+ import { useDOMRef } from '@react-spectrum/utils' ;
21
22
22
23
interface BreadcrumbsStyleProps {
23
24
/**
@@ -69,7 +70,7 @@ const wrapper = style<BreadcrumbsStyleProps>({
69
70
}
70
71
} , getAllowedOverrides ( ) ) ;
71
72
72
- function Breadcrumbs < T extends object > ( props : BreadcrumbsProps < T > ) {
73
+ function Breadcrumbs < T extends object > ( props : BreadcrumbsProps < T > , ref : DOMRef < HTMLOListElement > ) {
73
74
let {
74
75
UNSAFE_className = '' ,
75
76
UNSAFE_style,
@@ -78,11 +79,11 @@ function Breadcrumbs<T extends object>(props: BreadcrumbsProps<T>) {
78
79
children,
79
80
...otherProps
80
81
} = props ;
81
- let ref = useRef ( null ) ;
82
+ let domRef = useDOMRef ( ref ) ;
82
83
return (
83
84
< RACBreadcrumbs
84
85
{ ...otherProps }
85
- ref = { ref }
86
+ ref = { domRef }
86
87
style = { UNSAFE_style }
87
88
className = { UNSAFE_className + wrapper ( {
88
89
size
0 commit comments