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) => { show: (imsi) => {
this.setState({ this.setState({
confirm: { confirm: {
visible: true, imsi,
imsi visible: true
} }
}) })
}, },
hide: () => { hide: () => {
this.setState({ this.setState({
confirm: { confirm: {
...this.state.confirm,
visible: false visible: false
} }
}) })
}, },
delete: () => { delete: () => {
this.confirmHandler.hide();
const { dispatch } = this.props const { dispatch } = this.props
if (this.state.confirm.visible === true) {
this.confirmHandler.hide();
dispatch(deleteSubscriber(this.state.confirm.imsi)); dispatch(deleteSubscriber(this.state.confirm.imsi));
} }
} }
}
render() { render() {
const { const {