Added funcitonality to search result select to change shelf of selected book
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user