diff --git a/src/components/Breadcrumbs.tsx b/src/components/Breadcrumbs.tsx index ae0c536a..421587c6 100644 --- a/src/components/Breadcrumbs.tsx +++ b/src/components/Breadcrumbs.tsx @@ -406,6 +406,7 @@ export function Breadcrumbs({ }: BreadcrumbsProps & NavProps) { const contextCrumbs = useContext(BreadcrumbsContext)?.breadcrumbs const breadcrumbs = propsCrumbs || contextCrumbs + const nodeRef = useRef() if (!breadcrumbs) { throw Error( @@ -430,15 +431,11 @@ export function Breadcrumbs({ component is incorrect - // when not providing 'ref' prop - // @ts-expect-error - addEndListener={(node, done) => { - node?.addEventListener('refitdone', done, false) - }} + nodeRef={nodeRef} > {(state) => ( } @@ -147,7 +142,6 @@ function ModalRef( size = form ? 'large' : 'medium', onClose, severity, - lockBody = true, asForm = false, formProps = {}, scrollable = true, @@ -159,12 +153,6 @@ function ModalRef( const HeaderIcon = severityToIcon[severity ?? 'default'] const iconColorKey = severityToIconColorKey[severity ?? 'default'] - const [, setBodyLocked] = useLockedBody(open && lockBody) - - useEffect(() => { - setBodyLocked(lockBody && open) - }, [lockBody, open, setBodyLocked]) - const triggerClose = useCallback( (open: boolean) => { if (!open) onClose?.() @@ -195,6 +183,9 @@ function ModalRef( $scrollable={scrollable} $hasActions={!!actions} > + + {header} + {!!header && ( {HeaderIcon && ( diff --git a/src/components/SidebarItem.tsx b/src/components/SidebarItem.tsx index 7e9079a0..af7c2023 100644 --- a/src/components/SidebarItem.tsx +++ b/src/components/SidebarItem.tsx @@ -12,17 +12,21 @@ type SidebarItemProps = ComponentProps & { active?: boolean } -function SidebarItemRef({ - children, - tooltip = '', - expandedLabel = '', - className, - ...props -}: SidebarItemProps) { +function SidebarItemRef( + { + children, + tooltip = '', + expandedLabel = '', + className, + ...props + }: SidebarItemProps, + ref: Ref +) { const { isExpanded } = useSidebar() return ( + ref: Ref ) { const { layout, isExpanded } = useSidebar() @@ -117,18 +121,18 @@ const ItemSC = styled.div<{ function ItemRef( { children, clickable = false, active = false, ...props }: SidebarItemProps, - ref: Ref + ref: Ref ) { const { layout, variant } = useSidebar() const isHorizontal = layout === 'horizontal' return ( {children} diff --git a/src/components/Tooltip.tsx b/src/components/Tooltip.tsx index e7082c66..ff7585a5 100644 --- a/src/components/Tooltip.tsx +++ b/src/components/Tooltip.tsx @@ -118,6 +118,7 @@ function Tooltip({ const { x, y, + refs, reference, floating, strategy: finalStrategy, @@ -197,6 +198,7 @@ function Tooltip({ } >