@codacy/ui-components 0.62.1 → 0.62.3
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.
package/lib/Dropdown/Dropdown.js
CHANGED
|
@@ -84,7 +84,7 @@ export var Dropdown = function Dropdown(_ref) {
|
|
|
84
84
|
}, attributes.popper, {
|
|
85
85
|
size: size
|
|
86
86
|
}), children);
|
|
87
|
-
var containerElement = portal && document.querySelector('body');
|
|
87
|
+
var containerElement = portal && document.querySelector(portal === true ? 'body' : portal);
|
|
88
88
|
return /*#__PURE__*/React.createElement(DropdownContext.Provider, {
|
|
89
89
|
value: {
|
|
90
90
|
open: open,
|
|
@@ -19,7 +19,7 @@ export interface DropdownProps extends ContainerComponentProps, SpaceProps {
|
|
|
19
19
|
/** Initial selected value on start */
|
|
20
20
|
initialValue?: DropdownValueType;
|
|
21
21
|
/** Adds the panel object to a portal on the document's root; useful for dropdowns to be shown in a different context like an iframe. */
|
|
22
|
-
portal?: boolean;
|
|
22
|
+
portal?: boolean | string;
|
|
23
23
|
/** Callback to run when opening the dropdown */
|
|
24
24
|
onOpen?: () => void;
|
|
25
25
|
/** Callback to run when closing the dropdown */
|