Skip to content

Commit 0018dff

Browse files
authored
fix(Overlay): fix target type for react 19 refs (#115)
1 parent 4af9c50 commit 0018dff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/useWaitForDOMRef.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import useWindow from './useWindow';
55
import { VirtualElement } from './usePopper';
66

77
export type DOMContainer<T extends HTMLElement | VirtualElement = HTMLElement> =
8-
T | React.RefObject<T> | null | (() => T | React.RefObject<T> | null);
8+
9+
| T
10+
| React.RefObject<T | null>
11+
| null
12+
| (() => T | React.RefObject<T | null> | null);
913

1014
export const resolveContainerRef = <T extends HTMLElement | VirtualElement>(
1115
ref: DOMContainer<T> | undefined,

0 commit comments

Comments
 (0)