Here is my react Code.
OuterOne = () => {
alert("outer calling")
}
InnerOne = (ev) => {
ev.stopPropagation()
alert("here")
console.log(ev.target)
}
<div onRightClick={()=>this.OuterOne()}>
Outer
<br/>
<div onRightClick={(ev)=>this.InnerOne(ev)} style={{ margin:"10px" }}>
INner
</div>
</div>
I have two functions.
One is Inner and another is Outer . When i am calling Inner it calling the outer function because Inner div is wrapped inside outer div.
I wants to call only inner when i am clicking inner and outer function when clicking outer div.
The same i tested with javascript it is working, but not working with react.js
Is there any way to achive this ?
Please have a look.