react-crud-mobile 1.0.653 → 1.0.655

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.
@@ -682,14 +682,14 @@ function useIsVisible(ref, scope) {
682
682
  if (rect && typeof window !== 'undefined') {
683
683
  var windowHeight = window.innerHeight;
684
684
  var visible = rect.top < windowHeight && rect.bottom > 0;
685
- scope.visible = visible;
685
+ if (visible) scope.visible = visible;
686
686
  setIsVisible(visible);
687
687
  }
688
688
  } else {
689
689
  ref.current.measureInWindow == null || ref.current.measureInWindow(function (x, y, width, height) {
690
690
  var windowHeight = reactNative.Dimensions.get('window').height;
691
691
  var visible = y < windowHeight && y + height > 0;
692
- scope.visible = visible;
692
+ if (visible) scope.visible = visible;
693
693
  setIsVisible(visible);
694
694
  });
695
695
  }
@@ -725,7 +725,7 @@ function UIListRow(props) {
725
725
  }))),
726
726
  row = _useState[0];
727
727
  var targetRef = React.useRef(null);
728
- var isVisible = useIsVisible(targetRef, scope);
728
+ var isVisible = useIsVisible(targetRef, row);
729
729
  var onClick = function onClick(item) {
730
730
  row.call('click', {
731
731
  value: item,