about summary refs log tree commit diff
path: root/src/lib/ScrollContext.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ScrollContext.tsx')
-rw-r--r--src/lib/ScrollContext.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/ScrollContext.tsx b/src/lib/ScrollContext.tsx
index 00b197bed..d55b8cdab 100644
--- a/src/lib/ScrollContext.tsx
+++ b/src/lib/ScrollContext.tsx
@@ -5,6 +5,7 @@ const ScrollContext = createContext<ScrollHandlers<any>>({
   onBeginDrag: undefined,
   onEndDrag: undefined,
   onScroll: undefined,
+  onMomentumEnd: undefined,
 })
 
 export function useScrollHandlers(): ScrollHandlers<any> {
@@ -20,14 +21,16 @@ export function ScrollProvider({
   onBeginDrag,
   onEndDrag,
   onScroll,
+  onMomentumEnd,
 }: ProviderProps) {
   const handlers = useMemo(
     () => ({
       onBeginDrag,
       onEndDrag,
       onScroll,
+      onMomentumEnd,
     }),
-    [onBeginDrag, onEndDrag, onScroll],
+    [onBeginDrag, onEndDrag, onScroll, onMomentumEnd],
   )
   return (
     <ScrollContext.Provider value={handlers}>{children}</ScrollContext.Provider>