diff --git a/docs/lib/Components/PopoversPage.js b/docs/lib/Components/PopoversPage.js index e79f17b5c..86a53c642 100644 --- a/docs/lib/Components/PopoversPage.js +++ b/docs/lib/Components/PopoversPage.js @@ -31,7 +31,7 @@ export default class PopoversPage extends React.Component { // callback for toggling isOpen in the controlling component toggle: PropTypes.func, // boundaries for popper, can be scrollParent, window, viewport, or any DOM element - boundariesElement: PropTypes.string, + boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]), target: PropTypes.oneOfType([ PropTypes.string, PropTypes.func, diff --git a/docs/lib/Components/TooltipsPage.js b/docs/lib/Components/TooltipsPage.js index 266016086..c574023d6 100644 --- a/docs/lib/Components/TooltipsPage.js +++ b/docs/lib/Components/TooltipsPage.js @@ -31,7 +31,7 @@ export default class TooltipsPage extends React.Component { {`Tooltip.propTypes = { // boundaries for popper, can be scrollParent, window, viewport, or any DOM element - boundariesElement: PropTypes.string, + boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]), // boolean to control the state of the tooltip isOpen: PropTypes.bool, hideArrow: PropTypes.bool, diff --git a/src/Popover.js b/src/Popover.js index 4f42bf198..411275222 100644 --- a/src/Popover.js +++ b/src/Popover.js @@ -2,13 +2,13 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import PopperContent from './PopperContent'; -import { getTarget, mapToCssModules, omit, PopperPlacements, targetPropType } from './utils'; +import { getTarget, mapToCssModules, omit, PopperPlacements, targetPropType, DOMElement } from './utils'; const propTypes = { placement: PropTypes.oneOf(PopperPlacements), target: targetPropType.isRequired, container: targetPropType, - boundariesElement: PropTypes.string, + boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]), isOpen: PropTypes.bool, disabled: PropTypes.bool, hideArrow: PropTypes.bool, diff --git a/src/PopperContent.js b/src/PopperContent.js index 511f43a8a..d057cfa8a 100644 --- a/src/PopperContent.js +++ b/src/PopperContent.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import classNames from 'classnames'; import { Arrow, Popper as ReactPopper } from 'react-popper'; -import { getTarget, targetPropType, mapToCssModules } from './utils'; +import { getTarget, targetPropType, mapToCssModules, DOMElement } from './utils'; const propTypes = { children: PropTypes.node.isRequired, @@ -21,7 +21,7 @@ const propTypes = { container: targetPropType, target: targetPropType.isRequired, modifiers: PropTypes.object, - boundariesElement: PropTypes.string, + boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]), }; const defaultProps = { diff --git a/src/Tooltip.js b/src/Tooltip.js index 45f662b4b..6c26c34f4 100644 --- a/src/Tooltip.js +++ b/src/Tooltip.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import PopperContent from './PopperContent'; -import { getTarget, mapToCssModules, omit, PopperPlacements, targetPropType } from './utils'; +import { getTarget, mapToCssModules, omit, PopperPlacements, targetPropType, DOMElement } from './utils'; const propTypes = { placement: PropTypes.oneOf(PopperPlacements), @@ -11,7 +11,7 @@ const propTypes = { isOpen: PropTypes.bool, disabled: PropTypes.bool, hideArrow: PropTypes.bool, - boundariesElement: PropTypes.string, + boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]), className: PropTypes.string, innerClassName: PropTypes.string, arrowClassName: PropTypes.string,