     out))
 
 (def ^:private typeahead-state-initial
-  {:text ""
+  {:input-text ""
    :waiting? false
    :suggestions []})
 
 (defn- wrap [index count]
   (mod (+ count index) count))
 
-(defn- suggestion-select-prev
+(defn- select-prev
   [{:as state :keys [suggestions]}]
-  (update state :suggestion-selected-index #(-> % (or 0) dec (wrap (count suggestions)))))
-
-(defn- suggestion-select-next
+  (update state :selected-index #(-> % (or 0) dec (wrap (count suggestions)))))
+
+(defn- select-next
   [{:as state :keys [suggestions]}]
-  (update state :suggestion-selected-index #(-> % (or -1) inc (wrap (count suggestions)))))
-
-(defn- suggestion-select-set
+  (update state :selected-index #(-> % (or -1) inc (wrap (count suggestions)))))
+
+(defn- select-set
   [state i]
-  (assoc state :suggestion-selected-index i))
-
-(defn- suggestion-select-choose
-  [{:as state :keys [suggestions suggestion-selected-index]}]
-  (-> state
-      (assoc :model (nth suggestions suggestion-selected-index))
-      (dissoc :suggestions)))
-
-(defn- suggestion-select-reset
+  (assoc state :selected-index i))
+
+(defn- select-choose
+  [{:as state :keys [suggestions selected-index on-change]}]
+  (let [[search suggestion :as selected] (nth suggestions selected-index)]
+    (when on-change
+      (on-change suggestion))
+    (-> state
+        (assoc :model suggestion :input-text "")
+        (dissoc :suggestions))))
+
+(defn- select-reset
   [state]
-  (dissoc state :suggestion-selected-index))
+  (dissoc state :selected-index))
 
 (defn- reset-typeahead
   [state]
   (-> state
-      (assoc :waiting? false :suggestions [])
-      suggestion-select-reset))
+      (assoc :waiting? false :suggestions [] :input-text "")
+      select-reset))
 
 (defn- search-data-source
   "Call the user-supplied `data-source` fn and put the result on `c-sugg`.

  (when-let [key (keys-by-code (.-which event))]
    (.preventDefault event)
    (case key
      :tab   (swap! state-atom suggestion-select-next)
      true)))

(defn- typeahead
  "Returns markup for a typeahead text input"
  [& {:keys [model data-source] :as args}]
  {:pre [(validate-args-macro typeahead-args-desc args "typeahead")]}
  (let [{:as state :keys [ c-search c-sugg c-input c-keypress ]} (make-typeahead-state)
        state-atom (reagent/atom state)]
    (handle-search-results state-atom c-sugg)
    (handle-search state-atom c-sugg data-source c-search)
    (fn
      [& {:keys [model placeholder width height status-icon? status status-tooltip disabled? class style]
          :as   args}]
      {:pre [(validate-args-macro typeahead-args-desc args "typeahead")]}
      (let [{:keys [suggestions waiting? model suggestion-selected-index]} @state-atom
            width (or width "250px")]
        [v-box
         :width width
         :children
         [[input-text
           :class          class
           :style          style
           :disabled?      disabled?

           :width          width
           :height         height
           :placeholder    placeholder
           :on-change #(do (swap! state-atom assoc :input-text %)
                           (put! c-input %))
           :change-on-blur? false
           :attr {:on-key-up   #(on-key-up state-atom %)
                  :on-key-down #(on-key-down state-atom %)}]
          (if (or (not-empty suggestions) waiting?)
