                               40 (when-let [next-sibl (.-nextSibling s)]
                                    (upd next-sibl :down))
                               13 (do (.click (:selected @state))
-                                     (swap! state dissoc :selected)
-                                     #_(.blur (:node @state)))
+                                     (swap! state dissoc :selected))
                               (swap! state dissoc :selected)))
-                          (when-let [first-opt (cmn/f-child (:root-node @state) "option")]
-                            (.. first-opt -classList (add "active"))
-                            (swap! state assoc :selected first-opt
-                                   :suggestions-container
-                                   (cmn/f-child (:root-node @state) "options")))))
+                          (cond
+                            (and search-by-enter on-search (= 13 (.-keyCode e)))
+                            (on-search (.. e -target -value))
+                            :else (when-let [first-opt (cmn/f-child (:root-node @state) "option")]
+                              (.. first-opt -classList (add "active"))
+                              (swap! state assoc :selected first-opt
+                                     :suggestions-container
+                                     (cmn/f-child (:root-node @state) "options"))))))
         reset-input (fn [e]
                       (on-change nil)
                       (when search-fn

        label-fn (or label-fn identity)]

    (r/create-class
     {
      :component-did-mount
      (fn [this]
        (let [root (r/dom-node this)]
          (swap! state assoc :root-node root)

             :on-change #(search-fn (.. % -target -value))}])
         (when (:active @state)
           [:div.options {:class (when-not search-fn :no-input)}
            (when search-by-enter [:div.no-results "Press enter for lookup"])
            (if (= :loading options)
              [:div.no-results "Loading..."]
              [options-list options label-fn (comp #(swap! state assoc :active false)
                                                   on-change)])])])})))
