 
 (defn- input-text-will-blur
   "Update state when the `input-text` is about to lose focus."
-  [{:keys [input-text displaying-suggestion?] :as state}]
+  [{:keys [input-text displaying-suggestion? model] :as state}]
   (cond
     (and (not displaying-suggestion?)
          (event-updates-model? state :input-text-blurred))
-    (update-model input-text state)))
+    (update-model state input-text)
+    :else (-> state
+              ;; if nothing was actually selected, then view should be the unchanged value
+              (assoc :input-text model)
+              clear-suggestions)))
 
 (defn- change-data-source
   "Update `state` given a new `data-source`. Resets the typeahead since any existing suggestions

  (-> state
      reset-typeahead
      (assoc :data-source data-source)))

(defn- external-model-changed
  "Update state when the external model value has changed."
  [state new-value]
  (-> state
      (update-model new-value)
      (display-suggestion new-value)
      clear-suggestions))

;; ------------------------------------------------------------------------------------
;; Functions with side-effects

                     :change-on-blur? false
                     :attr {:on-key-down (partial input-text-on-key-down! state-atom)
                            :on-focus #()
                            ;; on-blur should behave the same as tabbing off
                            :on-blur #(swap! state-atom input-text-will-blur)}]
                    (if (or (not-empty suggestions) waiting?)
                      [box
                       :style {:position "relative"}
