fix: pass memoized on-scroll function to bottom-sheet screens

This commit is contained in:
Sean Hagstrom 2024-11-21 10:14:38 -08:00
parent 1cd90b236f
commit bb600d722e
No known key found for this signature in database
GPG Key ID: 5257FEDF56307320
1 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,8 @@
animating? (reagent/atom true)
set-animating-true #(reset! animating? true)
set-animating-false (fn [ms]
(js/setTimeout #(reset! animating? false) ms))]
(js/setTimeout #(reset! animating? false) ms))
on-scroll-update #(on-scroll % curr-scroll)]
(fn [{:keys [content skip-background?]}]
(let [theme (quo.theme/use-theme)
{:keys [top] :as insets} (safe-area/get-insets)
@ -94,5 +95,5 @@
:close close
:scroll-enabled? scroll-enabled?
:current-scroll curr-scroll
:on-scroll #(on-scroll % curr-scroll)
:on-scroll on-scroll-update
:sheet-animating? animating?}]]]]))))