From 4734f65f2ff04504d4de7c82e90dd7b7bb5153b4 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Sat, 7 May 2022 11:36:34 +0800 Subject: [PATCH] feat: focus menu item automaticly when focusing menu (#35407) * feat: focus menu item automaticly when focusing menu * chore: update mentions * test: fix test case * chore: decrease bundle size * chore: increase bundle size --- components/menu/__tests__/index.test.js | 6 ++---- package.json | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/menu/__tests__/index.test.js b/components/menu/__tests__/index.test.js index 243d7b3f1c..ba4a3a9375 100644 --- a/components/menu/__tests__/index.test.js +++ b/components/menu/__tests__/index.test.js @@ -942,14 +942,12 @@ describe('Menu', () => { const ref = React.createRef(); const { container } = render(
, ); expect(ref.current?.menu?.list).toBe(container.querySelector('ul')); ref.current?.focus(); - expect(document.activeElement).toBe(container.querySelector('ul')); + expect(document.activeElement).toBe(container.querySelector('li')); }); it('expandIcon', () => { diff --git a/package.json b/package.json index b67401b4d4..a951ed594d 100644 --- a/package.json +++ b/package.json @@ -133,8 +133,8 @@ "rc-image": "~5.6.0", "rc-input": "~0.0.1-alpha.5", "rc-input-number": "~7.3.0", - "rc-mentions": "~1.7.0", - "rc-menu": "~9.5.5", + "rc-mentions": "~1.8.0", + "rc-menu": "~9.6.0", "rc-motion": "^2.5.1", "rc-notification": "~4.6.0", "rc-pagination": "~3.1.9",