Reputation: 5308
The MouseLeave-function is called when I enter the svg-path with the mouse but not when leave it. The MouseEnter-funtion is called correctly. What is wrong?
return (
<path
onMouseEnter={_this.onMouseEnter.bind(this, d)}
onMouseLeave={_this.onMouseLeave()}/>
)
Upvotes: 0
Views: 229
Reputation: 112777
You should not call _this.onMouseLeave
. Just do the same you did for _this.onMouseEnter
:
return (
<path
onMouseEnter={_this.onMouseEnter.bind(this, d)}
onMouseLeave={_this.onMouseLeave.bind(this, d)}/>
)
Upvotes: 1