Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Added a fully black (no matter the theme) color SASS variable `$euiColorInk` ([2060](https://github.com/elastic/eui/pull/2060))
- Added `autoFocus` prop to `EuiTabbedContent` ([2062](https://github.com/elastic/eui/pull/2062))
- Changed `popout` glyph in `EuiIcon` to look more like external link ([2064](https://github.com/elastic/eui/pull/2064))
- Pass `EuiSuperSelect`'s `popoverClassName` to the popover's panel ([#2068](https://github.com/elastic/eui/pull/2068))

**Bug fixes**

Expand Down
6 changes: 5 additions & 1 deletion src/components/form/super_select/super_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ export class EuiSuperSelect extends Component {
popoverClassName
);

const popoverPanelClasses = classNames('euiSuperSelect__popoverPanel', {
[`${popoverClassName}__popoverPanel`]: !!popoverClassName,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are the brackets necessary? Shouldn't it just be:

Suggested change
[`${popoverClassName}__popoverPanel`]: !!popoverClassName,
`${popoverClassName}__popoverPanel`: !!popoverClassName,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Huh, I guess this is the first time we've used this pattern. 👍

});

const buttonClasses = classNames(
{
'euiSuperSelect--isOpen__button': this.state.isPopoverOpen,
Expand Down Expand Up @@ -232,7 +236,7 @@ export class EuiSuperSelect extends Component {
<EuiPopover
className={popoverClasses}
anchorClassName="euiSuperSelect__popoverAnchor"
panelClassName="euiSuperSelect__popoverPanel"
panelClassName={popoverPanelClasses}
button={button}
isOpen={isOpen || this.state.isPopoverOpen}
closePopover={this.closePopover}
Expand Down