@etsoo/react 1.8.41 → 1.8.42

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.
@@ -41,7 +41,9 @@ const ScrollerGrid = (props) => {
41
41
  // Load data
42
42
  const loadDataLocal = (pageAdd = 1) => {
43
43
  // Prevent multiple loadings
44
- if (!refs.current.hasNextPage || refs.current.isNextPageLoading)
44
+ if (!refs.current.hasNextPage ||
45
+ refs.current.isNextPageLoading ||
46
+ refs.current.isMounted === false)
45
47
  return;
46
48
  // Update state
47
49
  refs.current.isNextPageLoading = true;
@@ -59,7 +59,9 @@ const ScrollerList = (props) => {
59
59
  // Load data
60
60
  const loadDataLocal = (pageAdd = 1) => {
61
61
  // Prevent multiple loadings
62
- if (!stateRefs.current.hasNextPage || stateRefs.current.isNextPageLoading)
62
+ if (!stateRefs.current.hasNextPage ||
63
+ stateRefs.current.isNextPageLoading ||
64
+ stateRefs.current.isMounted === false)
63
65
  return;
64
66
  // Update state
65
67
  stateRefs.current.isNextPageLoading = true;
@@ -35,7 +35,9 @@ export const ScrollerGrid = (props) => {
35
35
  // Load data
36
36
  const loadDataLocal = (pageAdd = 1) => {
37
37
  // Prevent multiple loadings
38
- if (!refs.current.hasNextPage || refs.current.isNextPageLoading)
38
+ if (!refs.current.hasNextPage ||
39
+ refs.current.isNextPageLoading ||
40
+ refs.current.isMounted === false)
39
41
  return;
40
42
  // Update state
41
43
  refs.current.isNextPageLoading = true;
@@ -53,7 +53,9 @@ export const ScrollerList = (props) => {
53
53
  // Load data
54
54
  const loadDataLocal = (pageAdd = 1) => {
55
55
  // Prevent multiple loadings
56
- if (!stateRefs.current.hasNextPage || stateRefs.current.isNextPageLoading)
56
+ if (!stateRefs.current.hasNextPage ||
57
+ stateRefs.current.isNextPageLoading ||
58
+ stateRefs.current.isMounted === false)
57
59
  return;
58
60
  // Update state
59
61
  stateRefs.current.isNextPageLoading = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.8.41",
3
+ "version": "1.8.42",
4
4
  "description": "TypeScript ReactJs UI Independent Framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -206,7 +206,12 @@ export const ScrollerGrid = <T extends object>(props: ScrollerGridProps<T>) => {
206
206
  // Load data
207
207
  const loadDataLocal = (pageAdd: number = 1) => {
208
208
  // Prevent multiple loadings
209
- if (!refs.current.hasNextPage || refs.current.isNextPageLoading) return;
209
+ if (
210
+ !refs.current.hasNextPage ||
211
+ refs.current.isNextPageLoading ||
212
+ refs.current.isMounted === false
213
+ )
214
+ return;
210
215
 
211
216
  // Update state
212
217
  refs.current.isNextPageLoading = true;
@@ -164,7 +164,11 @@ export const ScrollerList = <T extends object>(props: ScrollerListProps<T>) => {
164
164
  // Load data
165
165
  const loadDataLocal = (pageAdd: number = 1) => {
166
166
  // Prevent multiple loadings
167
- if (!stateRefs.current.hasNextPage || stateRefs.current.isNextPageLoading)
167
+ if (
168
+ !stateRefs.current.hasNextPage ||
169
+ stateRefs.current.isNextPageLoading ||
170
+ stateRefs.current.isMounted === false
171
+ )
168
172
  return;
169
173
 
170
174
  // Update state