🐛 Fix Cannot update during an existing state transition

close #17147
This commit is contained in:
afc163 2019-07-15 19:29:00 +08:00
parent bed07392fd
commit 67e027a41c
2 changed files with 0 additions and 5 deletions

View File

@ -569,7 +569,6 @@ describe('Menu', () => {
.instance() .instance()
.getMenuOpenAnimation(''), .getMenuOpenAnimation(''),
).toBe(''); ).toBe('');
expect(wrapper.find('InternalMenu').state().switchingModeFromInline).toBe(false);
}); });
it('MenuItem should not render Tooltip when inlineCollapsed is false', () => { it('MenuItem should not render Tooltip when inlineCollapsed is false', () => {

View File

@ -276,10 +276,6 @@ class InternalMenu extends React.Component<InternalMenuProps, MenuState> {
// submenu should hide without animation // submenu should hide without animation
if (this.state.switchingModeFromInline) { if (this.state.switchingModeFromInline) {
menuOpenAnimation = ''; menuOpenAnimation = '';
this.setState({
switchingModeFromInline: false,
});
// this.switchingModeFromInline = false;
} else { } else {
menuOpenAnimation = 'zoom-big'; menuOpenAnimation = 'zoom-big';
} }