Skip to content
This repository was archived by the owner on Mar 25, 2023. It is now read-only.

Commit 61f3950

Browse files
onpawsmilesrichardson
authored andcommitted
PopoutBox: clarify parentRef
1 parent 655e570 commit 61f3950

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tdesign/src/PopoutBox/PopoutBox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface IPopoutBoxProps {
2929
popoutContainerStyle?: SystemStyleObject;
3030
anchorPosition?: PopoutAnchorPosition;
3131
buttonProps?: any;
32-
ref?: React.RefObject<HTMLDivElement>
32+
parentRef?: React.RefObject<HTMLDivElement>
3333
}
3434

3535
const getAnchorPositionStyle = (
@@ -98,10 +98,10 @@ export default ({
9898
popoutContainerStyle = {},
9999
anchorPosition,
100100
buttonProps = {},
101-
ref
101+
parentRef
102102
}: IPopoutBoxProps) => {
103103
const [isOpen, setIsOpen] = React.useState(false);
104-
const containerRef = ref || React.useRef<HTMLDivElement>(null);
104+
const containerRef = parentRef || React.useRef<HTMLDivElement>(null);
105105

106106
const anchorPositionStyle = getAnchorPositionStyle(anchorPosition);
107107

0 commit comments

Comments
 (0)