Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-core/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const Dropdown: React.FunctionComponent<DropdownProps> = ({
alignments,
contextProps,
menuAppendTo = 'inline',
isFlipEnabled = true,
isFlipEnabled = null,
removeFindDomNode = false,
...props
}: DropdownProps) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class DropdownWithContext extends React.Component<DropdownProps & OUIAPro
onSelect: (): void => undefined,
autoFocus: true,
menuAppendTo: 'inline',
isFlipEnabled: true
isFlipEnabled: null
};

constructor(props: DropdownProps & OUIAProps) {
Expand Down Expand Up @@ -93,7 +93,8 @@ export class DropdownWithContext extends React.Component<DropdownProps & OUIAPro
renderedContent = React.Children.toArray(children);
}
const openedOnEnter = this.openedOnEnter;
const isStatic = isFlipEnabled;
const isInline = menuAppendTo === 'inline';
const isStatic = !isInline && isFlipEnabled === null;
return (
<DropdownContext.Consumer>
{({ baseClass, baseComponent, id: contextId, ouiaId, ouiaComponentType, ouiaSafe, alignments }) => {
Expand Down Expand Up @@ -155,7 +156,7 @@ export class DropdownWithContext extends React.Component<DropdownProps & OUIAPro
}
})
)}
{menuAppendTo === 'inline' && isOpen && menuContainer}
{isInline && isOpen && menuContainer}
</BaseComponent>
);
const getParentElement = () => {
Expand All @@ -164,7 +165,7 @@ export class DropdownWithContext extends React.Component<DropdownProps & OUIAPro
}
return null;
};
return menuAppendTo === 'inline' ? (
return isInline ? (
mainContainer
) : (
<Popper
Expand Down