Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiInputPopover] Add panelMinWidth prop #7071

Merged
merged 9 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ exports[`EuiSuperSelect props custom display is propagated to dropdown 1`] = `
class="euiPanel euiPanel--plain euiPopover__panel emotion-euiPanel-grow-m-plain-euiPopover__panel-bottom"
data-popover-panel="true"
role="dialog"
style="top: 8px; left: 0px; will-change: transform, opacity; z-index: 2000;"
style="top: 8px; left: -22px; will-change: transform, opacity; z-index: 2000;"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally sure why this snapshot changed - I QA'd all components dogfooding EuiInputPopover (EuiComboBox, EuiSuperSelect, EuiRange, and EuiAutoRefresh) and all of them are still rendering the correct widths/positions for the popover. I'll put this down as Jest/jsdom gremlins 🤷

>
<div>
<div
Expand Down Expand Up @@ -390,7 +390,7 @@ exports[`EuiSuperSelect props more props are propogated to each option 1`] = `
class="euiPanel euiPanel--plain euiPopover__panel emotion-euiPanel-grow-m-plain-euiPopover__panel-bottom"
data-popover-panel="true"
role="dialog"
style="top: 8px; left: 0px; will-change: transform, opacity; z-index: 2000;"
style="top: 8px; left: -22px; will-change: transform, opacity; z-index: 2000;"
>
<div>
<div
Expand Down Expand Up @@ -536,7 +536,7 @@ exports[`EuiSuperSelect props options are rendered when select is open 1`] = `
class="euiPanel euiPanel--plain euiPopover__panel emotion-euiPanel-grow-m-plain-euiPopover__panel-bottom"
data-popover-panel="true"
role="dialog"
style="top: 8px; left: 0px; will-change: transform, opacity; z-index: 2000;"
style="top: 8px; left: -22px; will-change: transform, opacity; z-index: 2000;"
>
<div>
<div
Expand Down Expand Up @@ -681,7 +681,7 @@ exports[`EuiSuperSelect props renders popoverProps on the underlying EuiPopover
class="euiPanel euiPanel--plain euiPopover__panel goes-on-popover-panel emotion-euiPanel-grow-m-plain-euiPopover__panel-bottom"
data-popover-panel="true"
role="dialog"
style="top: 8px; left: 0px; will-change: transform, opacity; z-index: 2000;"
style="top: 8px; left: -22px; will-change: transform, opacity; z-index: 2000;"
>
<div>
<div
Expand Down
6 changes: 3 additions & 3 deletions src/components/form/super_select/super_select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
EuiSuperSelectControlProps,
EuiSuperSelectOption,
} from './super_select_control';
import { EuiInputPopover, EuiPopoverProps } from '../../popover';
import { EuiInputPopover, EuiInputPopoverProps } from '../../popover';
import {
EuiContextMenuItem,
EuiContextMenuItemLayoutAlignment,
Expand Down Expand Up @@ -80,15 +80,15 @@ export type EuiSuperSelectProps<T extends string> = CommonProps &
isOpen?: boolean;

/**
* Optional props to pass to the underlying [EuiPopover](/#/layout/popover).
* Optional props to pass to the underlying [EuiInputPopover](/#/layout/popover#popover-attached-to-input-element).
* Allows fine-grained control of the popover dropdown menu, including
* `repositionOnScroll` for EuiSuperSelects used within scrollable containers,
* and customizing popover panel styling.
*
* Does not accept a nested `popoverProps.isOpen` property - use the top level
* `isOpen` API instead.
*/
popoverProps?: Partial<CommonProps & Omit<EuiPopoverProps, 'isOpen'>>;
popoverProps?: Partial<CommonProps & Omit<EuiInputPopoverProps, 'isOpen'>>;
};

export class EuiSuperSelect<T extends string> extends Component<
Expand Down