mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
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
This commit is contained in:
parent
63d3c579f9
commit
4734f65f2f
@ -942,14 +942,12 @@ describe('Menu', () => {
|
||||
const ref = React.createRef();
|
||||
const { container } = render(
|
||||
<Menu ref={ref}>
|
||||
<SubMenu key="sub1" title="Navigation One">
|
||||
<Menu.Item key="1">Option 1</Menu.Item>
|
||||
</SubMenu>
|
||||
<Menu.Item key="1">Option 1</Menu.Item>
|
||||
</Menu>,
|
||||
);
|
||||
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', () => {
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user