Skip to content

Commit 2762495

Browse files
authored
Update README.md
1 parent c93ec1b commit 2762495

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ The component was designed to set a `<Reactooltip />` one place then use tooltip
118118
>I suggest always put `<ReactTooltip />` in the Highest level or smart component of Redux, so you might need these static
119119
method to control tooltip's behaviour in some situations
120120

121-
### 2. Hide tooltip when getContent returns null or undefined
122-
When you set `getContent={() => {return null}}` or `getContent={() => {return}}` you will find the tooltip will dispaly `true`, that's because React will set the value of data-* to be 'true' automatically if there is no value to be set. So you have to set `data-tip=''` in this situaction.
121+
### 2. Hide tooltip when getContent returns undefined
122+
When you set `getContent={() => { return }}` you will find the tooltip will dispaly `true`, that's because React will set the value of data-* to be 'true' automatically if there is no value to be set. So you have to set `data-tip=''` in this situaction.
123123

124124
```
125125
<p data-tip='' data-for='test'></p>

0 commit comments

Comments
 (0)