File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { useState } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import { omit } from 'ramda' ;
4
4
import { Fade as RSFade } from 'reactstrap' ;
@@ -17,12 +17,18 @@ const Fade = props => {
17
17
style,
18
18
...otherProps
19
19
} = props ;
20
+
21
+ // set visibility to hidden after transition has completed to hide tooltips
22
+ const [ hidden , setHidden ] = useState ( ! is_in ) ;
23
+
20
24
return (
21
25
< RSFade
22
26
baseClass = { base_class }
23
27
baseClassActive = { base_class_active }
24
28
in = { is_in }
25
- style = { is_in ? style : { visibility : 'hidden' , ...style } }
29
+ style = { hidden ? { visibility : 'hidden' , ...style } : style }
30
+ onEnter = { ( ) => setHidden ( false ) }
31
+ onExited = { ( ) => setHidden ( true ) }
26
32
{ ...omit ( [ 'setProps' ] , otherProps ) }
27
33
data-dash-is-loading = {
28
34
( loading_state && loading_state . is_loading ) || undefined
You can’t perform that action at this time.
0 commit comments