@mjhls/mjh-framework 1.0.411 → 1.0.412

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.411
2
+ # mjh-framework v. 1.0.412
3
3
 
4
4
 
5
5
  > Foundation Framework
@@ -64,8 +64,6 @@ var IssueDeck = function IssueDeck(props) {
64
64
  values = _useState8[0],
65
65
  setValues = _useState8[1];
66
66
 
67
- var deckRef = React.useRef(null);
68
-
69
67
  var prevValues = usePrevious(values);
70
68
 
71
69
  var urlFor = function urlFor(source) {
@@ -130,9 +128,17 @@ var IssueDeck = function IssueDeck(props) {
130
128
  }
131
129
  }, [values, prevValues, query, client, params, setIssuesData, setScrolling]);
132
130
 
131
+ React.useEffect(function () {
132
+ if (issuesData.length < count) {
133
+ var parentScroll = document.getElementsByClassName('infinite-scroll-component')[0];
134
+ parentScroll.style.overflow = 'hidden';
135
+ setScrolling(false);
136
+ }
137
+ }, [issuesData, setScrolling, count]);
138
+
133
139
  return React__default.createElement(
134
140
  index_es.InfiniteScroll,
135
- { ref: deckRef, dataLength: issuesData && issuesData.length, next: function next() {
141
+ { dataLength: issuesData && issuesData.length, next: function next() {
136
142
  return loadMore();
137
143
  }, hasMore: scrolling, scrollThreshold: 0.9 },
138
144
  React__default.createElement(
@@ -5,7 +5,7 @@ import './_iter-detect-7c281f0a.js';
5
5
  import { _ as _toConsumableArray } from './toConsumableArray-c5e2fde8.js';
6
6
  import './_object-pie-33c40e79.js';
7
7
  import { _ as _extends } from './extends-92072fff.js';
8
- import React__default, { useState, useRef, useEffect } from 'react';
8
+ import React__default, { useState, useEffect, useRef } from 'react';
9
9
  import 'prop-types';
10
10
  import Row from 'react-bootstrap/Row';
11
11
  import Col from 'react-bootstrap/Col';
@@ -59,8 +59,6 @@ var IssueDeck = function IssueDeck(props) {
59
59
  values = _useState8[0],
60
60
  setValues = _useState8[1];
61
61
 
62
- var deckRef = useRef(null);
63
-
64
62
  var prevValues = usePrevious(values);
65
63
 
66
64
  var urlFor = function urlFor(source) {
@@ -125,9 +123,17 @@ var IssueDeck = function IssueDeck(props) {
125
123
  }
126
124
  }, [values, prevValues, query, client, params, setIssuesData, setScrolling]);
127
125
 
126
+ useEffect(function () {
127
+ if (issuesData.length < count) {
128
+ var parentScroll = document.getElementsByClassName('infinite-scroll-component')[0];
129
+ parentScroll.style.overflow = 'hidden';
130
+ setScrolling(false);
131
+ }
132
+ }, [issuesData, setScrolling, count]);
133
+
128
134
  return React__default.createElement(
129
135
  InfiniteScroll,
130
- { ref: deckRef, dataLength: issuesData && issuesData.length, next: function next() {
136
+ { dataLength: issuesData && issuesData.length, next: function next() {
131
137
  return loadMore();
132
138
  }, hasMore: scrolling, scrollThreshold: 0.9 },
133
139
  React__default.createElement(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.411",
3
+ "version": "1.0.412",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",