-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Tooltip inner ref #1090
Tooltip inner ref #1090
Conversation
…p-innerRef * 'master' of github.com:reactstrap/reactstrap: fix(tooltip): fixed tooltip not disappearing on mobile (reactstrap#1083)
src/Tooltip.js
Outdated
@@ -34,6 +34,7 @@ const propTypes = { | |||
PropTypes.string, | |||
PropTypes.number | |||
]), | |||
innerRef: PropTypes.object, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this can still be a string or a function as well as the new createRef object.
Also need to document the prop (at the very least add it to the props on the docs for this component)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I've changed the propType definition and added the proper explanation in the docs
…p-innerRef * 'master' of github.com:reactstrap/reactstrap: feat(Modal): add ref to Modal (reactstrap#1087) feat(alert): add ability to disable fade (reactstrap#1078)
src/Tooltip.js
Outdated
innerRef: PropTypes.object, | ||
innerRef: PropTypes.oneOfType([ | ||
PropTypes.func, | ||
PropTypes.string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PropTypes.object
as well, I was merely stating that it can be these 2 in addition to the one previously specified.
Adding a innerRef prop to the
div
wrapping theTooltip
so it can accesed from the outsideThis PR solves the issue #1089