Skip to content

Commit

Permalink
fix(Overlay): fix target type for react 19 refs (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletsang authored Jan 14, 2025
1 parent 4af9c50 commit 0018dff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/useWaitForDOMRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import useWindow from './useWindow';
import { VirtualElement } from './usePopper';

export type DOMContainer<T extends HTMLElement | VirtualElement = HTMLElement> =
T | React.RefObject<T> | null | (() => T | React.RefObject<T> | null);

| T
| React.RefObject<T | null>
| null
| (() => T | React.RefObject<T | null> | null);

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

0 comments on commit 0018dff

Please sign in to comment.