prevent multiple click

This commit is contained in:
Sukchan Lee 2017-07-05 23:52:27 +09:00
parent 72e7d59392
commit d159cf43fd
1 changed files with 8 additions and 5 deletions

View File

@ -121,25 +121,28 @@ class Collection extends Component {
show: (imsi) => {
this.setState({
confirm: {
visible: true,
imsi
imsi,
visible: true
}
})
},
hide: () => {
this.setState({
confirm: {
...this.state.confirm,
visible: false
}
})
},
delete: () => {
this.confirmHandler.hide();
const { dispatch } = this.props
if (this.state.confirm.visible === true) {
this.confirmHandler.hide();
dispatch(deleteSubscriber(this.state.confirm.imsi));
}
}
}
render() {
const {