From f4b22acccdbb4d8ff2d9d1a0bf3cb6a183d6c41c Mon Sep 17 00:00:00 2001 From: Ken Jannette Date: Fri, 20 Apr 2018 17:18:40 -0400 Subject: [PATCH] Added funcitonality to search result select to change shelf of selected book --- src/App.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/App.js b/src/App.js index 7cd0901..596748b 100755 --- a/src/App.js +++ b/src/App.js @@ -30,13 +30,12 @@ class BooksApp extends React.Component { const id = e.target.name const newShelf = e.target.value let newBook - get(id).then((result) => { newBook = result newBook.shelf = newShelf - }); - this.setState({ - books: [...this.state.books, newBook] + this.setState({ + books: [...this.state.books, newBook] + }); }); }