close modal faster
This commit is contained in:
parent
56590ba57a
commit
41f5090e2c
1 changed files with 4 additions and 1 deletions
|
|
@ -186,9 +186,12 @@ export default class App extends Component {
|
|||
this.setState({
|
||||
todos: data.optimisticState
|
||||
}, () => {
|
||||
setTimeout(() => {
|
||||
this.closeModal()
|
||||
}, 600)
|
||||
|
||||
api.batchDelete(data.completedTodoIds).then(() => {
|
||||
console.log(`Batch removal complete`, data.completedTodoIds)
|
||||
this.closeModal()
|
||||
}).catch((e) => {
|
||||
console.log('An API error occurred', e)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue