File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ import React, { Component } from 'react';
44import '../../assets/bootstrap.less' ;
55
66interface TestState {
7- visible : boolean ;
7+ open : boolean ;
88 destroy ?: boolean ;
99}
1010
1111class Test extends Component {
1212 state = {
13- visible : false ,
13+ open : false ,
1414 } as TestState ;
1515
1616 handleDestroy = ( ) => {
@@ -33,7 +33,7 @@ class Test extends Component {
3333 < div >
3434 < div style = { { marginTop : 100 , marginLeft : 100 , marginBottom : 100 } } >
3535 < Tooltip
36- visible = { this . state . visible }
36+ open = { this . state . open }
3737 motion = { { motionName : 'rc-tooltip-zoom' } }
3838 trigger = { [ ] }
3939 overlayStyle = { { zIndex : 1000 } }
Original file line number Diff line number Diff line change @@ -7,16 +7,16 @@ function preventDefault(e) {
77}
88
99interface TestState {
10- visible : boolean ;
10+ open : boolean ;
1111 destroy ?: boolean ;
1212}
1313
1414class Test extends Component {
1515 state = {
16- visible : false ,
16+ open : false ,
1717 } as TestState ;
1818
19- onVisibleChange = visible => {
19+ onOpenChange = visible => {
2020 this . setState ( {
2121 visible,
2222 } ) ;
@@ -36,9 +36,9 @@ class Test extends Component {
3636 < div >
3737 < div style = { { marginTop : 300 , marginLeft : 100 , marginBottom : 100 } } >
3838 < Tooltip
39- visible = { this . state . visible }
39+ open = { this . state . open }
4040 motion = { { motionName : 'rc-tooltip-zoom' } }
41- onVisibleChange = { this . onVisibleChange }
41+ onOpenChange = { this . onOpenChange }
4242 trigger = "click"
4343 overlay = { < span > I am a tooltip</ span > }
4444 >
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class Test extends Component<any, TestState> {
8888 } ) ;
8989 } ;
9090
91- onVisibleChange = ( visible ) => {
91+ onOpenChange = ( visible ) => {
9292 console . log ( 'tooltip' , visible ) ; // eslint-disable-line no-console
9393 } ;
9494
@@ -211,7 +211,7 @@ class Test extends Component<any, TestState> {
211211 mouseLeaveDelay = { 0.1 }
212212 destroyTooltipOnHide = { this . state . destroyTooltipOnHide }
213213 trigger = { Object . keys ( this . state . trigger ) as ActionType [ ] }
214- onVisibleChange = { this . onVisibleChange }
214+ onOpenChange = { this . onOpenChange }
215215 overlay = { < div style = { { height : 50 , width : 50 } } > i am a tooltip</ div > }
216216 align = { {
217217 offset : [ this . state . offsetX , this . state . offsetY ] ,
You can’t perform that action at this time.
0 commit comments