tamagui 1.130.4 → 1.130.5

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/dist/native.js CHANGED
@@ -19063,29 +19063,34 @@ var require_SheetScrollView_native = __commonJS({
19063
19063
  }
19064
19064
  }, scrollable = scrollEnabled;
19065
19065
  (0, import_react3.useEffect)(function() {
19066
+ var _scrollRef_current;
19066
19067
  if (import_core12.isClient && scrollRef.current) {
19067
- var controller = new AbortController(), node = scrollRef.current.getScrollableNode();
19068
- node.addEventListener(
19069
- "touchmove",
19070
- function(e) {
19071
- scrollBridge.isParentDragging && node.scrollTo({
19072
- top: scrollBridge.y,
19073
- behavior: "instant"
19074
- });
19075
- },
19076
- // can't preventdefault its not cancellable
19077
- {
19078
- signal: controller.signal,
19079
- passive: !1
19080
- }
19081
- );
19082
- var disposeBridgeListen = scrollBridge.onParentDragging(function(val) {
19083
- });
19084
- return function() {
19085
- disposeBridgeListen(), controller.abort();
19086
- };
19068
+ var controller = new AbortController(), node = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.getScrollableNode();
19069
+ if (node) {
19070
+ node.addEventListener(
19071
+ "touchmove",
19072
+ function(e) {
19073
+ scrollBridge.isParentDragging && node.scrollTo({
19074
+ top: scrollBridge.y,
19075
+ behavior: "instant"
19076
+ });
19077
+ },
19078
+ // can't preventdefault its not cancellable
19079
+ {
19080
+ signal: controller.signal,
19081
+ passive: !1
19082
+ }
19083
+ );
19084
+ var disposeBridgeListen = scrollBridge.onParentDragging(function(val) {
19085
+ });
19086
+ return function() {
19087
+ disposeBridgeListen(), controller.abort();
19088
+ };
19089
+ }
19087
19090
  }
19088
- }, []);
19091
+ }, [
19092
+ scrollRef
19093
+ ]);
19089
19094
  var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
19090
19095
  parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
19091
19096
  };