@patternfly/react-table 4.111.31 → 4.111.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4887,12 +4887,10 @@
4887
4887
  renderedContent = React__namespace.Children.toArray(children);
4888
4888
  }
4889
4889
  const openedOnEnter = this.openedOnEnter;
4890
+ const isStatic = isFlipEnabled && menuAppendTo !== 'inline';
4890
4891
  return (React__namespace.createElement(DropdownContext.Consumer, null, ({ baseClass, baseComponent, id: contextId, ouiaId, ouiaComponentType, ouiaSafe, alignments }) => {
4891
4892
  const BaseComponent = baseComponent;
4892
- const menuContainer = (React__namespace.createElement(DropdownMenu
4893
- // This removes the `position: absolute` styling from the `.pf-c-dropdown__menu`
4894
- // allowing the menu to flip correctly
4895
- , Object.assign({}, (isFlipEnabled && { style: { position: 'revert', minWidth: 'min-content' } }), { setMenuComponentRef: this.setMenuComponentRef, component: component, isOpen: isOpen, position: position, "aria-labelledby": contextId ? `${contextId}-toggle` : id, isGrouped: isGrouped, autoFocus: openedOnEnter && autoFocus, alignments: alignments }), renderedContent));
4893
+ const menuContainer = (React__namespace.createElement(DropdownMenu, { className: css(isStatic && styles$8.modifiers.static), setMenuComponentRef: this.setMenuComponentRef, component: component, isOpen: isOpen, position: position, "aria-labelledby": contextId ? `${contextId}-toggle` : id, isGrouped: isGrouped, autoFocus: openedOnEnter && autoFocus, alignments: alignments }, renderedContent));
4896
4894
  const popperContainer = (React__namespace.createElement("div", { className: css(baseClass, direction === DropdownDirection.up && styles$8.modifiers.top, position === DropdownPosition.right && styles$8.modifiers.alignRight, isOpen && styles$8.modifiers.expanded, className) }, isOpen && menuContainer));
4897
4895
  const mainContainer = (React__namespace.createElement(BaseComponent, Object.assign({}, props, { className: css(baseClass, direction === DropdownDirection.up && styles$8.modifiers.top, position === DropdownPosition.right && styles$8.modifiers.alignRight, isOpen && styles$8.modifiers.expanded, isFullHeight && styles$8.modifiers.fullHeight, className), ref: this.baseComponentRef }, getOUIAProps(ouiaComponentType, ouiaId, ouiaSafe)),
4898
4896
  React__namespace.Children.map(toggle, oneToggle => React__namespace.cloneElement(oneToggle, {
@@ -4934,14 +4932,14 @@
4934
4932
  onSelect: () => undefined,
4935
4933
  autoFocus: true,
4936
4934
  menuAppendTo: 'inline',
4937
- isFlipEnabled: false
4935
+ isFlipEnabled: true
4938
4936
  };
4939
4937
 
4940
4938
  const Dropdown = (_a) => {
4941
4939
  var { onSelect,
4942
4940
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
4943
4941
  ref, // Types of Ref are different for React.FunctionComponent vs React.Component
4944
- ouiaId, ouiaSafe, alignments, contextProps, menuAppendTo = 'inline', isFlipEnabled = false, removeFindDomNode = false } = _a, props = __rest$1(_a, ["onSelect", "ref", "ouiaId", "ouiaSafe", "alignments", "contextProps", "menuAppendTo", "isFlipEnabled", "removeFindDomNode"]);
4942
+ ouiaId, ouiaSafe, alignments, contextProps, menuAppendTo = 'inline', isFlipEnabled = true, removeFindDomNode = false } = _a, props = __rest$1(_a, ["onSelect", "ref", "ouiaId", "ouiaSafe", "alignments", "contextProps", "menuAppendTo", "isFlipEnabled", "removeFindDomNode"]);
4945
4943
  return (React__namespace.createElement(DropdownContext.Provider, { value: Object.assign({ onSelect: event => onSelect && onSelect(event), toggleTextClass: styles$8.dropdownToggleText, toggleIconClass: styles$8.dropdownToggleImage, toggleIndicatorClass: styles$8.dropdownToggleIcon, menuClass: styles$8.dropdownMenu, itemClass: styles$8.dropdownMenuItem, toggleClass: styles$8.dropdownToggle, baseClass: styles$8.dropdown, baseComponent: 'div', sectionClass: styles$8.dropdownGroup, sectionTitleClass: styles$8.dropdownGroupTitle, sectionComponent: 'section', disabledClass: styles$8.modifiers.disabled, plainTextClass: styles$8.modifiers.text, ouiaId: useOUIAId(Dropdown.displayName, ouiaId), ouiaSafe, ouiaComponentType: Dropdown.displayName, alignments }, contextProps) },
4946
4944
  React__namespace.createElement(DropdownWithContext, Object.assign({ menuAppendTo: menuAppendTo, isFlipEnabled: isFlipEnabled, removeFindDomNode: removeFindDomNode }, props))));
4947
4945
  };
@@ -7181,10 +7179,8 @@
7181
7179
  break;
7182
7180
  }
7183
7181
  }
7184
- const innerMenu = (React__namespace.createElement(SelectMenu
7185
- // This removes the `position: absolute` styling from the `.pf-c-select__menu`
7186
- // allowing the menu to flip correctly
7187
- , Object.assign({}, (isFlipEnabled && { style: { position: 'revert' } }), props, { isGrouped: isGrouped, selected: selections }, variantProps, { openedOnEnter: openedOnEnter, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, sendRef: this.sendRef, keyHandler: this.handleMenuKeys, maxHeight: maxHeight, ref: this.menuComponentRef, footer: footer, footerRef: this.footerRef, isLastOptionBeforeFooter: this.isLastOptionBeforeFooter }), variantChildren));
7182
+ const isStatic = isFlipEnabled && menuAppendTo !== 'inline';
7183
+ const innerMenu = (React__namespace.createElement(SelectMenu, Object.assign({ className: css(isStatic && styles$6.modifiers.static) }, props, { isGrouped: isGrouped, selected: selections }, variantProps, { openedOnEnter: openedOnEnter, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, sendRef: this.sendRef, keyHandler: this.handleMenuKeys, maxHeight: maxHeight, ref: this.menuComponentRef, footer: footer, footerRef: this.footerRef, isLastOptionBeforeFooter: this.isLastOptionBeforeFooter }), variantChildren));
7188
7184
  const menuContainer = footer ? React__namespace.createElement("div", { className: css(styles$6.selectMenu) },
7189
7185
  " ",
7190
7186
  innerMenu,
@@ -7294,7 +7290,7 @@
7294
7290
  isInputFilterPersisted: false,
7295
7291
  isCreateSelectOptionObject: false,
7296
7292
  shouldResetOnSelect: true,
7297
- isFlipEnabled: false,
7293
+ isFlipEnabled: true,
7298
7294
  removeFindDomNode: false
7299
7295
  };
7300
7296