Answer the question
In order to leave comments, you need to log in
The onMouseOut event does not work correctly, what's the problem?
The element before the click has dimensions 60x60, after the click 200x170. onMouseOut fires on the old dimensions of the element, even though it was consolilated immediately before the function was executed, the house sees the new dimensions..
Code
<div
ref={this.elementRef}
className={cn()}
onClick={(!onShow)?this.onShow:null}
style={{
alignSelf: (show)?'baseline':'center',
transition: (show)?'.4s' : '0s',
zIndex: (show)?666:1,
height: (show)?'200px':this.state.sizeCard,
width: (show)?'170px':this.state.sizeCard,
background: card.bgnColor,
color: card.textColor
}}
onMouseOut={(onShow)?this.offShow:null}
>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question