I am just using Tooltip
, and not an OverlayTrigger
, but I am getting the error:
webpack-internal:///133:33 Warning: Failed prop type: The prop
overlay
is marked as required inTooltip
, but its value isundefined
.
The code is:
<Tooltip title="tooltip-for-node" placement="right" className="in" id="tooltip-right"
positionTop={this.state.tooltipY} positionLeft={this.state.tooltipX}>
Tooltip right
</Tooltip>
As you can see I tried setting the title
as is suggested in the thread:
https://github.com/ant-design/ant-design/issues/6897
It did not help. According to the official documentation Tooltip
does not have overlay
property required:
https://react-bootstrap.github.io/components/tooltips/
So, I am confused and not sure what I can try further to make it work. Any suggestions would be greatly appreciated.
The error was pretty non-informative. I noticed that I forgot to import React-Bootstrap
s' tooltip and the script was using a different rc-tooltip
:
import Tooltip from 'rc-tooltip';
After fixing the imports it started to work well:
import {Tooltip as BTooltip} from 'react-bootstrap';
import Tooltip from 'rc-tooltip';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.