Pass EuiSuperSelect's popoverClassName to the popover's panel#2068
Pass EuiSuperSelect's popoverClassName to the popover's panel#2068zumwalt merged 3 commits intoelastic:masterfrom
Conversation
c9d2a57 to
7e0748d
Compare
| ); | ||
|
|
||
| const popoverPanelClasses = classNames('euiSuperSelect__popoverPanel', { | ||
| [`${popoverClassName}__popoverPanel`]: !!popoverClassName, |
There was a problem hiding this comment.
Are the brackets necessary? Shouldn't it just be:
| [`${popoverClassName}__popoverPanel`]: !!popoverClassName, | |
| `${popoverClassName}__popoverPanel`: !!popoverClassName, |
There was a problem hiding this comment.
It looks like they’re required for dynamic class names: https://github.com/JedWatson/classnames/blob/master/README.md#dynamic-class-names-with-es2015
There was a problem hiding this comment.
Huh, I guess this is the first time we've used this pattern. 👍
cchaos
left a comment
There was a problem hiding this comment.
LGTM, though is there something you're trying to "fix" about the popover panel that this allows you to do? I know this component is super buggy, so just wondering if we need to be aware of something or need an issue.
|
No, not trying to fix anything with this, we just need it for some ill-advised theming 😭 |
|
Got it. Whew... 😉 |
Summary
This PR passes
EuiSuperSelect'spopoverClassNameto the popover's panel if it exists. This change will make it easier to target elements within the popover panel via CSS selectors.Checklist
[ ] This was checked in mobile[ ] This was checked in IE11[ ] This was checked in dark mode[ ] Any props added have proper autodocs[ ] Documentation examples were added[ ] This was checked for breaking changes and labeled appropriately[ ] Jest tests were updated or added to match the most common scenarios[ ] This was checked against keyboard-only and screenreader scenarios[ ] This required updates to Framer X components