Added funcitonality to search result select to change shelf of selected book

This commit is contained in:
Ken Jannette
2018-04-20 17:18:40 -04:00
parent 8ccdb86796
commit f4b22acccd

View File

@@ -30,14 +30,13 @@ 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]
});
});
}
onSelectChange = (e) => {