            :on-click (fn [_] (on-change i))}
           (label-fn i)]))]))
 
-(defn select [{:keys [on-search debounce-interval on-blur on-change label-fn]}]
+(defn select [{:keys [on-search debounce-interval on-blur on-change label-fn search-by-enter]}]
   (let [state (r/atom {:active false})
         doc-click-listener (fn [e]
                              (when (or (and (not (cmn/has-ancestor

                              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)))
                          (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)
