@@ -14,10 +14,11 @@ import {Breadcrumb as AriaBreadcrumb, BreadcrumbsProps as AriaBreadcrumbsProps,
1414import { AriaBreadcrumbItemProps , useLocale } from 'react-aria' ;
1515import ChevronIcon from '../ui-icons/Chevron' ;
1616import { createContext , forwardRef , ReactNode , useRef } from 'react' ;
17- import { DOMRefValue , LinkDOMProps } from '@react-types/shared' ;
17+ import { DOMRef , DOMRefValue , LinkDOMProps } from '@react-types/shared' ;
1818import { focusRing , getAllowedOverrides , StyleProps } from './style-utils' with { type : 'macro' } ;
1919import { forwardRefType } from './types' ;
2020import { size , style } from '../style/spectrum-theme' with { type : 'macro' } ;
21+ import { useDOMRef } from '@react-spectrum/utils' ;
2122
2223interface BreadcrumbsStyleProps {
2324 /**
@@ -69,7 +70,7 @@ const wrapper = style<BreadcrumbsStyleProps>({
6970 }
7071} , getAllowedOverrides ( ) ) ;
7172
72- function Breadcrumbs < T extends object > ( props : BreadcrumbsProps < T > ) {
73+ function Breadcrumbs < T extends object > ( props : BreadcrumbsProps < T > , ref : DOMRef < HTMLOListElement > ) {
7374 let {
7475 UNSAFE_className = '' ,
7576 UNSAFE_style,
@@ -78,11 +79,11 @@ function Breadcrumbs<T extends object>(props: BreadcrumbsProps<T>) {
7879 children,
7980 ...otherProps
8081 } = props ;
81- let ref = useRef ( null ) ;
82+ let domRef = useDOMRef ( ref ) ;
8283 return (
8384 < RACBreadcrumbs
8485 { ...otherProps }
85- ref = { ref }
86+ ref = { domRef }
8687 style = { UNSAFE_style }
8788 className = { UNSAFE_className + wrapper ( {
8889 size
0 commit comments