@atlaskit/dropdown-menu 11.5.8 → 11.5.9
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 +6 -0
- package/dist/cjs/internal/components/menu-wrapper.js +3 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/components/menu-wrapper.js +4 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/components/menu-wrapper.js +4 -2
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
- package/report.api.md +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 11.5.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c9b09094bfe`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c9b09094bfe) - Wrap DropdownMenu > MenuWrapper setInitialFocusRef call in useEffect to resolve React console error
|
|
8
|
+
|
|
3
9
|
## 11.5.8
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -89,7 +89,9 @@ var MenuWrapper = function MenuWrapper(_ref2) {
|
|
|
89
89
|
(0, _react.useLayoutEffect)(function () {
|
|
90
90
|
onUpdate();
|
|
91
91
|
}, [isLoading, onUpdate]);
|
|
92
|
-
|
|
92
|
+
(0, _react.useEffect)(function () {
|
|
93
|
+
setInitialFocusRef === null || setInitialFocusRef === void 0 ? void 0 : setInitialFocusRef(menuItemRefs[0]);
|
|
94
|
+
}, [menuItemRefs, setInitialFocusRef]);
|
|
93
95
|
return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
94
96
|
(0, _react2.jsx)(_menuGroup.default, (0, _extends2.default)({
|
|
95
97
|
role: "menu",
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { useContext, useLayoutEffect } from 'react';
|
|
4
|
+
import { useContext, useEffect, useLayoutEffect } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
7
7
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -68,7 +68,9 @@ const MenuWrapper = ({
|
|
|
68
68
|
useLayoutEffect(() => {
|
|
69
69
|
onUpdate();
|
|
70
70
|
}, [isLoading, onUpdate]);
|
|
71
|
-
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
setInitialFocusRef === null || setInitialFocusRef === void 0 ? void 0 : setInitialFocusRef(menuItemRefs[0]);
|
|
73
|
+
}, [menuItemRefs, setInitialFocusRef]);
|
|
72
74
|
return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
73
75
|
jsx(MenuGroup, _extends({
|
|
74
76
|
role: "menu",
|
package/dist/es2019/version.json
CHANGED
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["onClose", "onUpdate", "isLoading", "statusLabel", "setInitialFocusRef", "children"];
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
|
-
import { useContext, useLayoutEffect } from 'react';
|
|
6
|
+
import { useContext, useEffect, useLayoutEffect } from 'react';
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
9
9
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -72,7 +72,9 @@ var MenuWrapper = function MenuWrapper(_ref2) {
|
|
|
72
72
|
useLayoutEffect(function () {
|
|
73
73
|
onUpdate();
|
|
74
74
|
}, [isLoading, onUpdate]);
|
|
75
|
-
|
|
75
|
+
useEffect(function () {
|
|
76
|
+
setInitialFocusRef === null || setInitialFocusRef === void 0 ? void 0 : setInitialFocusRef(menuItemRefs[0]);
|
|
77
|
+
}, [menuItemRefs, setInitialFocusRef]);
|
|
76
78
|
return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
77
79
|
jsx(MenuGroup, _extends({
|
|
78
80
|
role: "menu",
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "11.5.
|
|
3
|
+
"version": "11.5.9",
|
|
4
4
|
"description": "A dropdown menu displays a list of actions or options to a user.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/docs": "*",
|
|
48
48
|
"@atlaskit/ds-explorations": "^1.6.0",
|
|
49
49
|
"@atlaskit/heading": "^1.0.0",
|
|
50
|
-
"@atlaskit/lozenge": "11.3.
|
|
50
|
+
"@atlaskit/lozenge": "11.3.5",
|
|
51
51
|
"@atlaskit/modal-dialog": "^12.4.0",
|
|
52
52
|
"@atlaskit/section-message": "^6.3.0",
|
|
53
53
|
"@atlaskit/ssr": "*",
|
package/report.api.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- API Report Version: 2.
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/dropdown-menu"
|
|
4
4
|
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
|
|
19
19
|
import type { CustomItemProps } from '@atlaskit/menu/types';
|
|
20
20
|
import { default as DropdownItemGroup } from '@atlaskit/menu/section';
|
|
21
|
-
import { jsx } from '@emotion/react';
|
|
22
21
|
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
23
22
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
24
23
|
import { ReactElement } from 'react';
|
|
@@ -124,7 +123,7 @@ interface DropdownItemRadioProps {
|
|
|
124
123
|
// @public
|
|
125
124
|
const DropdownMenu: <T extends HTMLElement = HTMLElement>(
|
|
126
125
|
props: DropdownMenuProps<T>,
|
|
127
|
-
) =>
|
|
126
|
+
) => JSX.Element;
|
|
128
127
|
export default DropdownMenu;
|
|
129
128
|
|
|
130
129
|
// @public (undocumented)
|