Added skeleton for onSelectChange

This commit is contained in:
Ken Jannette
2018-04-18 11:38:15 -04:00
parent d2f6d9f85f
commit 0db4f2b5ca
2 changed files with 7 additions and 4 deletions

View File

@@ -14,7 +14,6 @@ class BooksApp extends React.Component {
componentDidMount() {
getAll().then((books) => {
// console.log(books)
this.setState({ books })
})
}

View File

@@ -2,6 +2,10 @@ import React, { Component } from 'react';
class Bookshelf extends Component {
onSelectChange = () => {
console.log("onSelectChange")
}
render() {
const books = this.props.books
@@ -29,7 +33,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>
<select onChange={this.onSelectChange}>
<option value="none" disabled>Move to...</option>
<option value="currentlyReading">Currently Reading</option>
<option value="wantToRead">Want to Read</option>
@@ -61,7 +65,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>
<select onChange={this.onSelectChange}>
<option value="none" disabled>Move to...</option>
<option value="currentlyReading">Currently Reading</option>
<option value="wantToRead">Want to Read</option>
@@ -93,7 +97,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>
<select onChange={this.onSelectChange}>
<option value="none" disabled>Move to...</option>
<option value="currentlyReading">Currently Reading</option>
<option value="wantToRead">Want to Read</option>