invoice number like incorporates a timeout.
This commit is contained in:
@@ -119,6 +119,19 @@
|
||||
node))
|
||||
m))
|
||||
|
||||
(defonce timeouts
|
||||
(atom {}))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:dispatch-debounce
|
||||
(fn [{:keys [event time key]}]
|
||||
(js/clearTimeout (@timeouts key))
|
||||
(swap! timeouts assoc key
|
||||
(js/setTimeout (fn []
|
||||
(re-frame/dispatch event)
|
||||
(swap! timeouts dissoc key))
|
||||
time))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:graphql
|
||||
(fn [{:keys [query on-success on-error token variables query-obj]}]
|
||||
|
||||
Reference in New Issue
Block a user