File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -613,7 +613,7 @@ export class SubMenu extends React.Component<SubMenuProps> {
613613 getPopupContainer = { getPopupContainer }
614614 builtinPlacements = { placement }
615615 popupPlacement = { popupPlacement }
616- popupVisible = { isOpen }
616+ popupVisible = { isInlineMode ? false : isOpen }
617617 popupAlign = { popupAlign }
618618 popup = { isInlineMode ? null : children }
619619 action = { ( disabled || isInlineMode ) ? [ ] : [ triggerSubMenuAction ] }
Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ describe('SubMenu', () => {
483483
484484 title . simulate ( 'click' ) ;
485485 jest . runAllTimers ( ) ;
486- expect ( wrapper . find ( 'CSSMotion' ) . at ( 1 ) . prop ( 'motionName' ) ) . toEqual ( 'fade' ) ;
486+ expect ( wrapper . find ( 'CSSMotion' ) . prop ( 'motionName' ) ) . toEqual ( 'fade' ) ;
487487 } ) ;
488488
489489 it ( 'should not animate on initially opened menu' , ( ) => {
@@ -516,12 +516,7 @@ describe('SubMenu', () => {
516516 title . simulate ( 'click' ) ;
517517 jest . runAllTimers ( ) ;
518518
519- expect (
520- wrapper
521- . find ( 'CSSMotion' )
522- . at ( 1 )
523- . prop ( 'motionAppear' ) ,
524- ) . toBeTruthy ( ) ;
519+ expect ( wrapper . find ( 'CSSMotion' ) . prop ( 'motionAppear' ) ) . toBeTruthy ( ) ;
525520 } ) ;
526521 } ) ;
527522
You can’t perform that action at this time.
0 commit comments