react-crud-mobile 1.0.884 → 1.0.886

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.
@@ -653,6 +653,19 @@ function UISlider(props) {
653
653
  var step = scope.attr('step', 1);
654
654
  var min = scope.attr('min', 0);
655
655
  var max = scope.attr('min', 100);
656
+ var onSlideScroll = function onSlideScroll(scrollEnabled) {
657
+ var viewScope = reactCrudUtils.ComponentUtils.getViewScope();
658
+ if (scope.original.debug) {
659
+ console.log(viewScope);
660
+ }
661
+ if (viewScope) {
662
+ var _scrollRef$current;
663
+ var scrollRef = viewScope.get('scrollRef');
664
+ if (scrollRef) (_scrollRef$current = scrollRef.current) == null || _scrollRef$current.setNativeProps({
665
+ scrollEnabled: scrollEnabled
666
+ });
667
+ }
668
+ };
656
669
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
657
670
  children: /*#__PURE__*/jsxRuntime.jsx(Slider, {
658
671
  minimumValue: min,
@@ -662,6 +675,12 @@ function UISlider(props) {
662
675
  maximumTrackTintColor: "#d3d3d3",
663
676
  thumbTintColor: "#1EB1FC",
664
677
  value: value,
678
+ onSlidingStart: function onSlidingStart() {
679
+ return onSlideScroll(false);
680
+ },
681
+ onSlidingComplete: function onSlidingComplete() {
682
+ return onSlideScroll(true);
683
+ },
665
684
  style: _extends({
666
685
  width: '100%',
667
686
  height: 40
@@ -1296,6 +1315,7 @@ function UIModal(props) {
1296
1315
  var label = scope.getLabel();
1297
1316
  var theme = scope.getTheme();
1298
1317
  var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1318
+ var scrollRef = React.useRef(null);
1299
1319
  var style = function style(part, extra) {
1300
1320
  var st = _extends({}, styles$8[part], extra);
1301
1321
  return _extends({}, scope.getStyle(part, st));
@@ -1366,6 +1386,8 @@ function UIModal(props) {
1366
1386
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1367
1387
  }
1368
1388
  var headerRight = reactCrudUtils.ComponentUtils.getDefine(props, 'header', 'right');
1389
+ scope.put('scrollRef', scrollRef);
1390
+ reactCrudUtils.ComponentUtils.setViewScope(scope);
1369
1391
  return /*#__PURE__*/jsxRuntime.jsxs(reactNative.Modal, {
1370
1392
  animationType: "slide",
1371
1393
  transparent: true,
@@ -1401,6 +1423,7 @@ function UIModal(props) {
1401
1423
  paddingBottom: 50
1402
1424
  },
1403
1425
  style: style('modalContent'),
1426
+ ref: scrollRef,
1404
1427
  children: /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
1405
1428
  style: {
1406
1429
  flex: 1
@@ -1454,6 +1477,7 @@ function UIView(_ref) {
1454
1477
  var header = scope.getPart('header', null, []);
1455
1478
  var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1456
1479
  var headerTextStyle = reactCrudUtils.Utils.nvl((_theme$styles2 = theme.styles) == null || (_theme$styles2 = _theme$styles2.defaults) == null ? void 0 : _theme$styles2.headerText, {});
1480
+ var scrollRef = React.useRef(null);
1457
1481
  React.useEffect(function () {
1458
1482
  reactNative.StatusBar.setBarStyle('light-content');
1459
1483
  reactNative.StatusBar.setBackgroundColor == null || reactNative.StatusBar.setBackgroundColor(theme.colors.primary);
@@ -1479,6 +1503,8 @@ function UIView(_ref) {
1479
1503
  children: header
1480
1504
  });
1481
1505
  };
1506
+ scope.put('scrollRef', scrollRef);
1507
+ reactCrudUtils.ComponentUtils.setViewScope(scope);
1482
1508
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1483
1509
  children: [hasHeader && /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
1484
1510
  style: headerStyleFull,
@@ -1488,6 +1514,7 @@ function UIView(_ref) {
1488
1514
  children: /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
1489
1515
  onScroll: onScroll,
1490
1516
  scrollEventThrottle: 16,
1517
+ ref: scrollRef,
1491
1518
  keyboardShouldPersistTaps: "handled",
1492
1519
  contentContainerStyle: scope.getStyle('contentContainer', {
1493
1520
  paddingBottom: 50