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' ;
22import PropTypes from 'prop-types' ;
33import { omit } from 'ramda' ;
44import { Fade as RSFade } from 'reactstrap' ;
@@ -17,12 +17,18 @@ const Fade = props => {
1717 style,
1818 ...otherProps
1919 } = props ;
20+
21+ // set visibility to hidden after transition has completed to hide tooltips
22+ const [ hidden , setHidden ] = useState ( ! is_in ) ;
23+
2024 return (
2125 < RSFade
2226 baseClass = { base_class }
2327 baseClassActive = { base_class_active }
2428 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 ) }
2632 { ...omit ( [ 'setProps' ] , otherProps ) }
2733 data-dash-is-loading = {
2834 ( loading_state && loading_state . is_loading ) || undefined
You can’t perform that action at this time.
0 commit comments