           :on-change #(put! chan-textvalue (-> % .-target .-value))
           :on-key-up #(put! chan-keys (-> % .-which))}]
         [:span.input-group-addon.glyphicon.glyphicon-search]
-        [autocomplete-component (:autocomplete-size props) autocomplete-items textvalue chan-selecteditems chan-focus chan-log]]
+        [autocomplete-component (:autocomplete-size props) autocomplete-items textvalue chan-selecteditems chan-focus chan-current-suggestion chan-log]]
        [:div.top-space200
-        [preview-component nil chan-log]]])))
+        [preview-component chan-current-suggestion chan-log]]])))
 
 ;; how to model behavior of search results?
 ;; typeahead component sends search query message to search-query channel

(defn search-component
  "renders the search input box"
  [props]
  (let [chan-query (chan) ;; sampled text term that is used for ajax wiki API calls
        chan-textvalue (chan) ;; channel to hold text value from input box
        chan-keys (chan) ;; channel to store individual keys to respond to keys like return and tab
        chan-sampler (chan (sliding-buffer 1)) ;; channel used to hold current value of text; since this buffer is of size 1, only the most recent value is stored in this channel

           [:ul.dropdown-menu
            {:role "menu"}
            (for [item (take size @itemsref)]
              ^{:key (utils/uuid)} [autocomplete-item chan-selecteditems chan-current-suggestion item ref-focus-item])]])
        [:div.close]))))

;;; search input box and component
