This is my code for react
handleRemoveClick = material => {
let idMaterial = material.material_id;
if(this.state.operation === 0){
this.setState( { previewShowAlertRemoveProduct : true })
}
this.setState( { operation : 1, material_id : idMaterial})
}
handleEndOrder(){
if(this.state.operation === 0){
this.setState( { previewShowAlertRemoveProduct : true })
}
this.setState( { operation : 2})
}
This is for Render the View:
<button class="btn btn-xs btn-danger pull-right" onClick={e => this.handleRemoveClick(material)}>x</button>
How to fix this ? onClick it's not working at all
I have binded in the constructor the handleEndOrder