I use reactstrap
. I have this kind of <button>
with an icon
inside :
{this.props.mode === "update"
?
<Button
className="btn btn-danger btn-sm"
onClick={() => this.deleteQuestion()}
>
<i className="fa fa-trash"></i>
</Button>
: null
}
If I click on the icon
, the function in not triggered.
If I click outside the icon
(but inside the button), the function is triggered.
What is this mystery? I am a beginner in React and react-strap.