Skip to content

Commit

Permalink
remove container
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcfaul committed May 9, 2023
1 parent cd16cbc commit 37e259f
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions packages/react-core/src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const SelectBase: React.FunctionComponent<SelectProps & OUIAProps> = ({
}: SelectProps & OUIAProps) => {
const localMenuRef = React.useRef<HTMLDivElement>();
const toggleRef = React.useRef<HTMLButtonElement>();
const containerRef = React.useRef<HTMLDivElement>();

const menuRef = (innerRef as React.RefObject<HTMLDivElement>) || localMenuRef;
React.useEffect(() => {
Expand Down Expand Up @@ -139,18 +138,15 @@ const SelectBase: React.FunctionComponent<SelectProps & OUIAProps> = ({
</Menu>
);
return (
<div ref={containerRef}>
<Popper
trigger={toggle(toggleRef)}
triggerRef={toggleRef}
popper={menu}
popperRef={menuRef}
appendTo={containerRef.current || undefined}
isVisible={isOpen}
zIndex={zIndex}
{...popperProps}
/>
</div>
<Popper
trigger={toggle(toggleRef)}
triggerRef={toggleRef}
popper={menu}
popperRef={menuRef}
isVisible={isOpen}
zIndex={zIndex}
{...popperProps}
/>
);
};

Expand Down

0 comments on commit 37e259f

Please sign in to comment.