D
D
Dmitry Vinokurov2020-05-28 17:46:28
React
Dmitry Vinokurov, 2020-05-28 17:46:28

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

1 answer(s)
P
Pavel Didenko, 2020-05-29
@D1mar1k

I think you are here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question