Addded default values to book drop down selects
This commit is contained in:
@@ -27,7 +27,7 @@ class Bookshelf extends Component {
|
||||
<div className="book-top">
|
||||
<div className="book-cover" style={{ width: 128, height: 193, backgroundImage: `url("${ book.imageLinks.thumbnail }")` }}></div>
|
||||
<div className="book-shelf-changer">
|
||||
<select name={book.id} onChange={onSelect}>
|
||||
<select name={book.id} onChange={onSelect} defaultValue={book.shelf}>
|
||||
<option value="none">Move to...</option>
|
||||
<option value="currentlyReading">Currently Reading</option>
|
||||
<option value="wantToRead">Want to Read</option>
|
||||
|
||||
@@ -19,7 +19,6 @@ class SearchPage extends Component {
|
||||
for (var book of books) {
|
||||
if (result.title === book.title) {
|
||||
result.shelf = book.shelf
|
||||
console.log(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +52,7 @@ class SearchPage extends Component {
|
||||
<div className="book-top">
|
||||
<div className="book-cover" style={{ width: 128, height: 193, backgroundImage: `url("${ result.imageLinks.thumbnail }")` }}></div>
|
||||
<div className="book-shelf-changer">
|
||||
<select name={result.id} onChange={onSelect}>
|
||||
<select name={result.id} onChange={onSelect} defaultValue={result.shelf}>
|
||||
<option value="none">Move to...</option>
|
||||
<option value="currentlyReading">Currently Reading</option>
|
||||
<option value="wantToRead">Want to Read</option>
|
||||
|
||||
Reference in New Issue
Block a user