@wallarm-org/design-system 0.38.1-rc-feature-AS-971.1 → 0.38.2

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.
@@ -4,9 +4,14 @@ const COOLDOWN_MS = 200;
4
4
  const useEndReached = ({ mode, scrollRef, onEndReached, threshold = TABLE_END_REACHED_THRESHOLD })=>{
5
5
  const firedRef = useRef(false);
6
6
  const lastFiredAtRef = useRef(0);
7
+ const onEndReachedRef = useRef(onEndReached);
8
+ useEffect(()=>{
9
+ onEndReachedRef.current = onEndReached;
10
+ });
7
11
  useEffect(()=>{
8
- if (!onEndReached) return;
9
12
  const check = ()=>{
13
+ const callback = onEndReachedRef.current;
14
+ if (!callback) return;
10
15
  let scrollTop;
11
16
  let clientHeight;
12
17
  let scrollHeight;
@@ -27,7 +32,7 @@ const useEndReached = ({ mode, scrollRef, onEndReached, threshold = TABLE_END_RE
27
32
  if (!firedRef.current && now - lastFiredAtRef.current >= COOLDOWN_MS) {
28
33
  firedRef.current = true;
29
34
  lastFiredAtRef.current = now;
30
- onEndReached();
35
+ callback();
31
36
  }
32
37
  } else firedRef.current = false;
33
38
  };
@@ -43,7 +48,6 @@ const useEndReached = ({ mode, scrollRef, onEndReached, threshold = TABLE_END_RE
43
48
  }, [
44
49
  mode,
45
50
  scrollRef,
46
- onEndReached,
47
51
  threshold
48
52
  ]);
49
53
  };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.38.0",
3
- "generatedAt": "2026-05-15T16:26:24.927Z",
2
+ "version": "0.38.1",
3
+ "generatedAt": "2026-05-18T12:15:53.965Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "0.38.1-rc-feature-AS-971.1",
3
+ "version": "0.38.2",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",