Debounce refresh when typing
This commit is contained in:
parent
c91b1ff2d4
commit
8d7e4dde0e
1 changed files with 3 additions and 3 deletions
|
|
@ -153,7 +153,7 @@
|
|||
(obtain-oauth-authorization-code! application))))))
|
||||
|
||||
(declare fetch-posts!)
|
||||
(declare refresh-displayed-posts!)
|
||||
(declare debounced-refresh!)
|
||||
|
||||
(defn- fetch-application-settings []
|
||||
(->> (db/open-cursor! ::db/application db/all)
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
(if (zero? post-count)
|
||||
(fetch-posts! {:instance-url (:instance_url application)
|
||||
:bearer-token (:bearer_token application)})
|
||||
(refresh-displayed-posts! (:section/posts @state))))))))
|
||||
(debounced-refresh! (:section/posts @state))))))))
|
||||
|
||||
;;; views
|
||||
|
||||
|
|
@ -287,7 +287,7 @@
|
|||
:on-change (fn [e]
|
||||
(let [query (.. e -target -value)]
|
||||
(swap! state assoc-in [:section/posts :query] (if (str/blank? query) nil query))
|
||||
(refresh-displayed-posts! (:section/posts @state))))}])
|
||||
(debounced-refresh! (:section/posts @state))))}])
|
||||
|
||||
(defn- debug
|
||||
"Implements a lazy pretty-printer for whatever is passed in as `obj`. The
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue