Pass event

This commit is contained in:
Jordan Eldredge 2018-03-25 07:34:01 -07:00
parent 525bbcdb0d
commit 8f3b70f28e

View file

@ -17,12 +17,12 @@ export default class ClickedDiv extends React.Component {
<div
{...this.props}
className={classnames(this.props.className, this.state)}
onMouseDown={() => {
onMouseDown={e => {
if (!this.state.clicked) {
this.setState({ clicked: true });
}
if (this.props.onMouseDown) {
this.props.onMouseDown();
this.props.onMouseDown(e);
}
}}
/>