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 {
3030 render ( ) {
3131 const child = Children . only ( this . props . children )
3232
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-
4433 return (
4534 < span className = { this . props . wrapperClassName } >
4635 { cloneElement ( child , {
@@ -50,7 +39,14 @@ class Tooltip extends Component {
5039 child . ref ( node )
5140 }
5241 } ,
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+ } ,
5450 } ) }
5551 { this . _popper ( ) }
5652 </ span >
You can’t perform that action at this time.
0 commit comments