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

disable flip property in popover components #595

Merged
merged 3 commits into from Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/Popover.js
Expand Up @@ -8,7 +8,10 @@ Popover.propTypes = {

Popover.defaultProps = {
...Popover.defaultProps,
fade: false
fade: false,
// This is a workaround for the reactstrap Tooltip memory leak issue.
// https://github.com/reactstrap/reactstrap/issues/1482
flip: false,
};

export default Popover;
11 changes: 9 additions & 2 deletions src/components/Tooltip.js
Expand Up @@ -11,7 +11,10 @@ export default class Tooltip extends React.Component {
static defaultProps = {
...InnerTooltip.defaultProps,
isOpen: false,
fade: false
fade: false,
// This is a workaround for the reactstrap Tooltip memory leak issue.
// https://github.com/reactstrap/reactstrap/issues/1482
flip: false,
};

state = {
Expand All @@ -26,7 +29,11 @@ export default class Tooltip extends React.Component {
const { isOpen, ...props } = this.props; // eslint-disable-line no-unused-vars

return (
<InnerTooltip isOpen={this.state.isOpen} toggle={this.toggle} {...props} />
<InnerTooltip
isOpen={this.state.isOpen}
toggle={this.toggle}
{...props}
/>
);
}
}
7 changes: 7 additions & 0 deletions src/components/UncontrolledPopover.js
@@ -1,3 +1,10 @@
import UncontrolledPopover from 'reactstrap/lib/UncontrolledPopover';

UncontrolledPopover.defaultProps = {
...UncontrolledPopover.defaultProps,
// This is a workaround for the reactstrap Tooltip memory leak issue.
// https://github.com/reactstrap/reactstrap/issues/1482
flip: false,
};

export default UncontrolledPopover;
7 changes: 7 additions & 0 deletions src/components/UncontrolledTooltip.js
@@ -1,3 +1,10 @@
import UncontrolledTooltip from 'reactstrap/lib/UncontrolledTooltip';

UncontrolledTooltip.defaultProps = {
...UncontrolledTooltip.defaultProps,
// This is a workaround for the reactstrap Tooltip memory leak issue.
// https://github.com/reactstrap/reactstrap/issues/1482
flip: false,
};

export default UncontrolledTooltip;