File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -30,17 +30,6 @@ class Tooltip extends Component {
30
30
render ( ) {
31
31
const child = Children . only ( this . props . children )
32
32
33
- const actionProps = this . props . visible == null ? {
34
- onMouseOver : ( ...args ) => {
35
- child . props . onMouseOver && child . props . onMouseOver ( ...args )
36
- this . setState ( { shouldShow : true } )
37
- } ,
38
- onMouseOut : ( ...args ) => {
39
- child . props . onMouseOut && child . props . onMouseOut ( ...args )
40
- this . setState ( { shouldShow : false } )
41
- } ,
42
- } : { }
43
-
44
33
return (
45
34
< span className = { this . props . wrapperClassName } >
46
35
{ cloneElement ( child , {
@@ -50,7 +39,14 @@ class Tooltip extends Component {
50
39
child . ref ( node )
51
40
}
52
41
} ,
53
- ...actionProps ,
42
+ onMouseOver : ( ...args ) => {
43
+ child . props . onMouseOver && child . props . onMouseOver ( ...args )
44
+ this . setState ( { shouldShow : true } )
45
+ } ,
46
+ onMouseOut : ( ...args ) => {
47
+ child . props . onMouseOut && child . props . onMouseOut ( ...args )
48
+ this . setState ( { shouldShow : false } )
49
+ } ,
54
50
} ) }
55
51
{ this . _popper ( ) }
56
52
</ span >
You can’t perform that action at this time.
0 commit comments