Skip to content

Commit 1ca6c4a

Browse files
author
Eric Olkowski
committed
Updated conditional for adding static class
1 parent 42f2ac4 commit 1ca6c4a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

packages/react-core/src/components/Dropdown/DropdownWithContext.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,14 @@ export class DropdownWithContext extends React.Component<DropdownProps & OUIAPro
9393
renderedContent = React.Children.toArray(children);
9494
}
9595
const openedOnEnter = this.openedOnEnter;
96+
const isStatic = isFlipEnabled && direction === DropdownDirection.down;
9697
return (
9798
<DropdownContext.Consumer>
9899
{({ baseClass, baseComponent, id: contextId, ouiaId, ouiaComponentType, ouiaSafe, alignments }) => {
99100
const BaseComponent = baseComponent as any;
100101
const menuContainer = (
101102
<DropdownMenu
102-
className={css(isFlipEnabled && styles.modifiers.static)}
103+
className={css(isStatic && styles.modifiers.static)}
103104
setMenuComponentRef={this.setMenuComponentRef}
104105
component={component}
105106
isOpen={isOpen}

packages/react-core/src/components/Select/Select.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,9 +1258,10 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
12581258
}
12591259
}
12601260

1261+
const isStatic = isFlipEnabled && direction === SelectDirection.down;
12611262
const innerMenu = (
12621263
<SelectMenu
1263-
className={css(isFlipEnabled && styles.modifiers.static)}
1264+
className={css(isStatic && styles.modifiers.static)}
12641265
{...props}
12651266
isGrouped={isGrouped}
12661267
selected={selections}

packages/react-integration/demo-app-ts/src/components/demos/SelectDemo/SelectDemo.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,7 @@ export class SelectDemo extends Component<SelectDemoState> {
13101310
Checkbox Title
13111311
</span>
13121312
<Select
1313+
direction="up"
13131314
toggleId="select-document-body-toggle"
13141315
variant={SelectVariant.checkbox}
13151316
aria-label="Select Input"

0 commit comments

Comments
 (0)