         b[@props.sort]
 
     React.DOM.ul className: "book-list",
-      BookListItem(key: book.vpl_id, book: book, showFiction: @props.onlyfiction is "no") for id, book of books
+      BookListItem(key: book.vpl_id, book: book, showFiction: @props.onlyfiction is "no", showAvailability: @props.onlyavailable is "no") for id, book of books
 
 BookListItem = React.createClass
   displayName: "BookListItem"
 
   shouldComponentUpdate: (nextProps, nextState) ->
-    @props.book isnt nextProps.book or @props.showFiction isnt nextProps.showFiction
+    @props.book isnt nextProps.book or @props.showFiction isnt nextProps.showFiction or @props.showAvailability isnt nextProps.showAvailability
 
   render: ->
     { vpl_id, title, vpl_url, author, availability, available, availability_url, holds, vpl_rating, isbn, img, goodreads_id, goodreads_url, goodreads_rating, amazon_url, amazon_rating, goodreads_categories, description, fiction } = @props.book

  render: ->
    books = @props.books
    books = (b for b in books when b.fiction) if @props.onlyfiction is "yes"
    books = _.sortBy books, (b) =>
      if @props.sort.indexOf("rating") isnt -1
        -b[@props.sort]

DEFAULT_SETTINGS =
  sort: "goodreads_rating"
  onlyfiction: "yes"
  onlyavailable: "no"

SORT_FIELDS = [
  ["goodreads_rating", "Goodreads Rating"]
