@neovici/cosmoz-omnitable 12.26.2 → 12.26.4

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.
@@ -57,6 +57,8 @@ customElements.define(
57
57
  'hash-param',
58
58
  'sort-on',
59
59
  'group-on',
60
+ 'descending',
61
+ 'group-on-descending',
60
62
  'hide-select-all',
61
63
  'settings-id',
62
64
  'no-local',
@@ -10,12 +10,12 @@ export const isCloseEnough = (a = 0, b = 0) => Math.abs(a - b) < 0.1,
10
10
  }),
11
11
  [tween, setTween] = useState(target),
12
12
  animate = useCallback(() => {
13
- state.current.request = requestAnimationFrame(animate);
14
-
15
13
  if (!state.current.running) {
16
14
  return;
17
15
  }
18
16
 
17
+ state.current.request = requestAnimationFrame(animate);
18
+
19
19
  setTween((tween) => {
20
20
  const target = state.current.target;
21
21
 
@@ -28,7 +28,7 @@ export const isCloseEnough = (a = 0, b = 0) => Math.abs(a - b) < 0.1,
28
28
  isCloseEnough(tween[idx], t)
29
29
  ? t
30
30
  : (tween[idx] ?? 0) +
31
- ((t ?? 0) - (tween[idx] ?? 0)) / speedFactor || 0
31
+ ((t ?? 0) - (tween[idx] ?? 0)) / speedFactor || 0,
32
32
  );
33
33
  });
34
34
  }, []);
@@ -42,8 +42,13 @@ export const isCloseEnough = (a = 0, b = 0) => Math.abs(a - b) < 0.1,
42
42
  if (state.current.target.length === 0 && target.length > 0) {
43
43
  setTween(target);
44
44
  }
45
+
45
46
  state.current.target = target;
47
+
48
+ if (state.current.running) return;
49
+
46
50
  state.current.running = true;
51
+ state.current.request = requestAnimationFrame(animate);
47
52
  }, [target]);
48
53
 
49
54
  return tween;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-omnitable",
3
- "version": "12.26.2",
3
+ "version": "12.26.4",
4
4
  "description": "[![Build Status](https://travis-ci.org/Neovici/cosmoz-omnitable.svg?branch=master)](https://travis-ci.org/Neovici/cosmoz-omnitable)",
5
5
  "keywords": [
6
6
  "web-components"