V
V
Vladimir Golub2019-06-11 12:23:36
React
Vladimir Golub, 2019-06-11 12:23:36

Why doesn't the wrapper event fire when Button is disabled?

The code

<div onMouseMove={() => {console.log('Hello')}} className={'wrap-button'}>
                            <button
                                {...buttonProps}
                                style={this.stylesElem}
                            >
                                {this.props.children}
                            </button>
                        </div>

When you hover over the button, the event does not fire?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-06-11
@RazerVG

.disabled {
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
}

Using the class, you can make any element inactive, for example, links styled like buttons.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question