                   :id           "input-search"
                   :value        @query
                   :on-change    #(dispatch-sync [:update-query (-> % .-target .-value)])
-                  :on-key-press #(dispatch-on-press-enter % [:load-memories])}]]
+                  :on-key-press #(dispatch-on-press-enter % [:load-memories 0])}]]
         [:div {:class "col-lg-1"}
-         [:button {:type "submit" :class "btn btn-primary" :on-click #(dispatch [:load-memories])} "Search"]]
+         [:button {:type "submit" :class "btn btn-primary" :on-click #(dispatch [:load-memories 0])} "Search"]]
         ]])))
 
 (defn memory-pager []

(register-handler
  :page-memories
  (fn [app-state [_ i]]
    (let [max (dec (get-in app-state [:ui-state :memories :pages]))
          idx (Math/max 0 (Math/min max i))]
      (assoc-in app-state [:ui-state :results-page] idx))
    ))


  :load-memories-success
  (fn [app-state [_ memories]]
    (-> app-state
        (assoc-in [:ui-state :results-page] (:current-page memories))
        (assoc-in [:ui-state :memories] memories)
        (assoc-in [:ui-state :is-searching?] false))
    ))
