Skip to content

Commit

Permalink
Fix for build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
thatblindgeye committed Feb 2, 2023
1 parent 68b87bd commit 1ae1055
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions packages/react-core/src/components/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,29 +467,25 @@ export const Popover: React.FunctionComponent<PopoverProps> = ({
return containerRef?.current;
};

const popoverPopper = (
<Popper
trigger={children}
reference={reference}
popper={content}
popperMatchesTriggerWidth={false}
appendTo={appendTo === 'inline' ? getInlineReference() || undefined : appendTo}
isVisible={visible}
positionModifiers={positionModifiers}
distance={distance}
placement={position}
onTriggerClick={onTriggerClick}
onDocumentClick={onDocumentClick}
onDocumentKeyDown={onDocumentKeyDown}
enableFlip={enableFlip}
zIndex={zIndex}
flipBehavior={flipBehavior}
/>
);

return (
<PopoverContext.Provider value={{ headerComponent }}>
{appendTo === 'inline' && children ? <div ref={containerRef}>{popoverPopper}</div> : popoverPopper}
<Popper
trigger={children && <div ref={containerRef}>{children}</div>}
reference={reference}
popper={content}
popperMatchesTriggerWidth={false}
appendTo={appendTo === 'inline' ? getInlineReference() || undefined : appendTo}
isVisible={visible}
positionModifiers={positionModifiers}
distance={distance}
placement={position}
onTriggerClick={onTriggerClick}
onDocumentClick={onDocumentClick}
onDocumentKeyDown={onDocumentKeyDown}
enableFlip={enableFlip}
zIndex={zIndex}
flipBehavior={flipBehavior}
/>
</PopoverContext.Provider>
);
};
Expand Down

0 comments on commit 1ae1055

Please sign in to comment.