Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/popper-virtualref-null.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@radix-ui/react-popper": patch
---

Allow `PopperAnchor`'s `virtualRef` to accept a `RefObject<Measurable | null>`, matching the type that `useRef<Measurable>(null)` returns in React 19.
2 changes: 1 addition & 1 deletion packages/react/popper/src/popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const ANCHOR_NAME = 'PopperAnchor';
type PopperAnchorElement = React.ComponentRef<typeof Primitive.div>;
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
interface PopperAnchorProps extends PrimitiveDivProps {
virtualRef?: React.RefObject<Measurable>;
virtualRef?: React.RefObject<Measurable | null>;
}

const PopperAnchor = React.forwardRef<PopperAnchorElement, PopperAnchorProps>(
Expand Down