From 85382bbc28e06f92b3b7374cb663efe9fc0fbdda Mon Sep 17 00:00:00 2001 From: Sean Hagstrom Date: Tue, 26 Mar 2024 09:45:17 +0000 Subject: [PATCH] tweak: forward on-press events --- src/react_native/utils.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/react_native/utils.cljs b/src/react_native/utils.cljs index 79f3f72ab4..a4363148dc 100644 --- a/src/react_native/utils.cljs +++ b/src/react_native/utils.cljs @@ -14,11 +14,11 @@ [{:keys [on-press allow-multiple-presses? throttle-duration]} throttle-id] (if allow-multiple-presses? on-press - (fn [] + (fn [event] (let [id @throttle-id] (when (and id (not (get @throttle id))) (swap! throttle assoc id true) - (on-press) + (on-press event) (js/setTimeout #(swap! throttle dissoc id) (or throttle-duration 500)))))))