@codeleap/mobile 3.18.9 → 3.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/mobile",
3
- "version": "3.18.9",
3
+ "version": "3.20.0",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -133,6 +133,8 @@ export const Pager = (pagerProps: PagerProps) => {
133
133
  const hasScrollDirectionDisabled = !scrollLeftEnabled || !scrollRightEnabled
134
134
 
135
135
  const handleScrollEnd = useCallback((event: ScrollEvent) => {
136
+ if (!scrollEnabled) return null
137
+
136
138
  if (waitEventDispatch.current === true) return null
137
139
 
138
140
  waitEventDispatch.current = true
@@ -155,6 +157,8 @@ export const Pager = (pagerProps: PagerProps) => {
155
157
  }, [childArr, page, setPage, waitEventDispatch.current])
156
158
 
157
159
  const handleScroll = (event: ScrollEvent) => {
160
+ if (!scrollEnabled) return null
161
+
158
162
  const scrollX = event?.nativeEvent?.contentOffset?.x
159
163
 
160
164
  if (!_scrollEnabled) {