diff --git a/types/reactstrap/lib/Popover.d.ts b/types/reactstrap/lib/Popover.d.ts index 1e314e4115..bcd4c51a26 100644 --- a/types/reactstrap/lib/Popover.d.ts +++ b/types/reactstrap/lib/Popover.d.ts @@ -6,8 +6,8 @@ export interface PopoverProps extends React.HTMLAttributes { [key: string]: any; isOpen?: boolean; toggle?: React.MouseEventHandler | (() => void); - target: string | HTMLElement; - container?: string | HTMLElement; + target: string | HTMLElement | React.RefObject; + container?: string | HTMLElement | React.RefObject; boundariesElement?: Popper.Boundary | Element; className?: string; placement?: Popper.Placement; diff --git a/types/reactstrap/lib/Tooltip.d.ts b/types/reactstrap/lib/Tooltip.d.ts index 1b57520d4c..c186f02bb6 100644 --- a/types/reactstrap/lib/Tooltip.d.ts +++ b/types/reactstrap/lib/Tooltip.d.ts @@ -4,8 +4,8 @@ import { CSSModule } from '../index'; export interface UncontrolledTooltipProps extends React.HTMLAttributes { [key: string]: any; - target: string | HTMLElement; - container?: string | HTMLElement; + target: string | HTMLElement | React.RefObject; + container?: string | HTMLElement | React.RefObject; delay?: number | {show: number, hide: number}; className?: string; popperClassName?: string; diff --git a/types/reactstrap/reactstrap-tests.tsx b/types/reactstrap/reactstrap-tests.tsx index d3405b1749..f69c2746e3 100644 --- a/types/reactstrap/reactstrap-tests.tsx +++ b/types/reactstrap/reactstrap-tests.tsx @@ -4776,3 +4776,20 @@ class Example130 extends React.Component { ); } } + +const CustomInputTestInnerRef = () => { + const ref = React.createRef(); + return (); +}; + +const PopoverTestInnerRef = () => { + const target = React.createRef(); + const container = React.createRef(); + return (Yo!); +}; + +const UncontrolledTooltipTestInnerRef = () => { + const target = React.createRef(); + const container = React.createRef(); + return (Yo!); +};