diff --git a/CHANGELOG.md b/CHANGELOG.md index 47ae974fec5..fd76d070151 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ - Deprecated `PartitionConfig` in favor of inclusion in Charts `theme.partition` ([#5492](https://github.com/elastic/eui/pull/5492)) +**Breaking changes** + +- Removed `popoverClassName` and `repositionOnScroll` props from `EuiSuperSelect` (use `popoverProps` instead) ([#5512](https://github.com/elastic/eui/pull/5512)) + ## [`43.1.1`](https://github.com/elastic/eui/tree/v43.1.1) **Bug fixes** diff --git a/src-docs/src/views/flyout/flyout_complicated.js b/src-docs/src/views/flyout/flyout_complicated.js index 441da9a8010..d4e4dbbe100 100644 --- a/src-docs/src/views/flyout/flyout_complicated.js +++ b/src-docs/src/views/flyout/flyout_complicated.js @@ -232,7 +232,7 @@ export default () => { valueOfSelected={superSelectvalue} onChange={(value) => onSuperSelectChange(value)} itemLayoutAlign="top" - repositionOnScroll={true} + popoverProps={{ repositionOnScroll: true }} hasDividers /> diff --git a/src/components/form/super_select/super_select.tsx b/src/components/form/super_select/super_select.tsx index 1c5c5d0fb6e..a9d266708e5 100644 --- a/src/components/form/super_select/super_select.tsx +++ b/src/components/form/super_select/super_select.tsx @@ -76,7 +76,7 @@ export type EuiSuperSelectProps = CommonProps & /** * Optional props to pass to the underlying [EuiPopover](/#/layout/popover). - * Allows fine-grained control of the popover dropdown menu, including + * Allows fine-grained control of the popover dropdown menu, including * `repositionOnScroll` for EuiSuperSelects used within scrollable containers, * and customizing popover panel styling. * @@ -84,22 +84,6 @@ export type EuiSuperSelectProps = CommonProps & * `isOpen` API instead. */ popoverProps?: Partial>; - - /** - * Applied to the outermost wrapper (popover) - * - * **DEPRECATED: Use `popoverProps.className` instead (will take precedence over this prop if set).** - */ - popoverClassName?: string; - - /** - * When `true`, the popover's position is re-calculated when the user - * scrolls. When nesting an `EuiSuperSelect` in a scrollable container, - * `repositionOnScroll` should be `true` - * - * **DEPRECATED: Use `popoverProps.repositionOnScroll` instead (will take precedence over this prop if set).** - */ - repositionOnScroll?: boolean; }; export class EuiSuperSelect extends Component< @@ -276,16 +260,14 @@ export class EuiSuperSelect extends Component< itemClassName, itemLayoutAlign, fullWidth, - popoverClassName, popoverProps, compressed, - repositionOnScroll, ...rest } = this.props; const popoverClasses = classNames( 'euiSuperSelect', - popoverProps?.className ?? popoverClassName + popoverProps?.className ); const buttonClasses = classNames( @@ -346,7 +328,6 @@ export class EuiSuperSelect extends Component<