From 67e027a41c10ad2f61db2ad32bcf37a61ccb426f Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 15 Jul 2019 19:29:00 +0800 Subject: [PATCH] :bug: Fix Cannot update during an existing state transition close #17147 --- components/menu/__tests__/index.test.js | 1 - components/menu/index.tsx | 4 ---- 2 files changed, 5 deletions(-) diff --git a/components/menu/__tests__/index.test.js b/components/menu/__tests__/index.test.js index f33029bbde..1076de172c 100644 --- a/components/menu/__tests__/index.test.js +++ b/components/menu/__tests__/index.test.js @@ -569,7 +569,6 @@ describe('Menu', () => { .instance() .getMenuOpenAnimation(''), ).toBe(''); - expect(wrapper.find('InternalMenu').state().switchingModeFromInline).toBe(false); }); it('MenuItem should not render Tooltip when inlineCollapsed is false', () => { diff --git a/components/menu/index.tsx b/components/menu/index.tsx index f52086f583..ca39243fc5 100644 --- a/components/menu/index.tsx +++ b/components/menu/index.tsx @@ -276,10 +276,6 @@ class InternalMenu extends React.Component { // submenu should hide without animation if (this.state.switchingModeFromInline) { menuOpenAnimation = ''; - this.setState({ - switchingModeFromInline: false, - }); - // this.switchingModeFromInline = false; } else { menuOpenAnimation = 'zoom-big'; }