@synerise/ds-app-menu 0.6.17 → 0.6.19
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/CHANGELOG.md +19 -0
- package/dist/NavigableItems/NavigableItems.js +10 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.6.19](https://github.com/Synerise/synerise-design/compare/@synerise/ds-app-menu@0.6.18...@synerise/ds-app-menu@0.6.19) (2023-04-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-app-menu
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.6.18](https://github.com/Synerise/synerise-design/compare/@synerise/ds-app-menu@0.6.17...@synerise/ds-app-menu@0.6.18) (2023-03-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **app-menu:** fix disappearing icons when resizing window ([b97a5ae](https://github.com/Synerise/synerise-design/commit/b97a5aea85b130d52e2d951f71ee434df69f12b1))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.6.17](https://github.com/Synerise/synerise-design/compare/@synerise/ds-app-menu@0.6.16...@synerise/ds-app-menu@0.6.17) (2023-03-06)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-app-menu
|
|
@@ -25,21 +25,29 @@ var NavigableItems = function NavigableItems(_ref) {
|
|
|
25
25
|
animationInProgress = _React$useState3[0],
|
|
26
26
|
setAnimationInProgress = _React$useState3[1];
|
|
27
27
|
|
|
28
|
+
var _React$useState4 = React.useState(0),
|
|
29
|
+
lastHeight = _React$useState4[0],
|
|
30
|
+
setLastHeight = _React$useState4[1];
|
|
31
|
+
|
|
28
32
|
var countCapacity = React.useCallback(function () {
|
|
29
33
|
if (ref.current) {
|
|
30
34
|
var _ref$current$getBound = ref.current.getBoundingClientRect(),
|
|
31
35
|
height = _ref$current$getBound.height;
|
|
32
36
|
|
|
37
|
+
if (height > 0) {
|
|
38
|
+
setLastHeight(height);
|
|
39
|
+
}
|
|
40
|
+
|
|
33
41
|
var itemsHeight = children.length * itemHeight;
|
|
34
42
|
setIndex(0);
|
|
35
43
|
|
|
36
44
|
if (itemsHeight > height) {
|
|
37
|
-
setItemsCapacity(Math.floor(height / itemHeight));
|
|
45
|
+
setItemsCapacity(Math.floor((height || lastHeight) / itemHeight));
|
|
38
46
|
} else {
|
|
39
47
|
setItemsCapacity(Infinity);
|
|
40
48
|
}
|
|
41
49
|
}
|
|
42
|
-
}, [children.length, ref]);
|
|
50
|
+
}, [children.length, ref, lastHeight, setLastHeight]);
|
|
43
51
|
React.useEffect(function () {
|
|
44
52
|
window.addEventListener('resize', countCapacity);
|
|
45
53
|
return function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-app-menu",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.19",
|
|
4
4
|
"description": "AppMenu UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-icon": "^0.
|
|
36
|
-
"@synerise/ds-tooltip": "^0.13.
|
|
35
|
+
"@synerise/ds-icon": "^0.55.0",
|
|
36
|
+
"@synerise/ds-tooltip": "^0.13.1",
|
|
37
37
|
"@synerise/ds-typography": "^0.12.7",
|
|
38
38
|
"@synerise/ds-utils": "^0.19.0"
|
|
39
39
|
},
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"@synerise/ds-core": "*",
|
|
42
42
|
"react": ">=16.9.0 < 17.0.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "3b8c3b1437ecbdda775a790ac3c27d6b1b6cbf26"
|
|
45
45
|
}
|