From 41f5090e2cd2d45a94065664aeace1ddaf729acc Mon Sep 17 00:00:00 2001 From: DavidWells Date: Wed, 20 Jun 2018 20:31:39 -0700 Subject: [PATCH] close modal faster --- src/App.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 049d1ab..2aae659 100644 --- a/src/App.js +++ b/src/App.js @@ -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) })