-
-
Notifications
You must be signed in to change notification settings - Fork 529
Closed
Labels
Description
Bug description
A tooltip is displayed even when its contents are null or undefined.
In our case, we have a react-simple-maps component, and when the users hover over countries, only for countries with data should the tooltip be displayed.
Version of Package
5.22.0
To Reproduce
Import the Tooltip component from react-tooltip and use it as follows:
<Tooltip> {tooltipData ? renderTooltipData() : null} </Tooltip>
Change the state of tooltipData, and see that when it's null, an empty tooltip is displayed.
Expected behavior
If tooltipData is null or undefined, the tooltip should not be displayed.
Additional context
- The bug is not reproduced on version 5.21.7.
- React version we use: ^17.0.2
Reactions are currently unavailable
