Answer the question
In order to leave comments, you need to log in
Why is the event bubbling?
There is such a component (everything that is not relevant to the question has been removed from it):
class PortfolioSectionPanel extends React.Component {
constructor() {
super();
this.state = {
showWorks: false,
}
this.showWorks = (e) => {
e.stopPropagation();
this.setState({
showWorks: !this.state.showWorks,
})
}
render() {
return(
<div className='portfolio-panel' id='porfolioPanel' ref={this.props.link}>
<div className='portfolio-panel-background' ref={this.props.linkCircle} onTransitionEnd={(e) => {this.showWorks(e); console.log(1)}} >
<ReactCSSTransitionGroup
transitionName='portfolio-panel__information'
transitionEnterTimeout={500}
transitionLeaveTimeout={500}>
{middleElementCircle}
</ReactCSSTransitionGroup>
<div style={diskStyle} className='portfolio-panel-disk' id='portfolio-panel-disk'>
<ReactCSSTransitionGroup
transitionName='work-item'
transitionEnterTimeout={500}
transitionLeaveTimeout={500}>
{workItems}
</ReactCSSTransitionGroup>
</div>
</div>
</div>
)
}
}
export default PortfolioSectionPanel;
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