File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,10 @@ export default class Menu extends Component {
3838 }
3939
4040 componentDidUpdate ( ) {
41- debug ( 'component did update' , this . _name ) ;
42- this . context . menuActions . _notify ( ) ;
41+ // force update if menu is opened as its content might have changed
42+ const force = this . _isOpen ( ) ;
43+ debug ( 'component did update' , this . _name , force ) ;
44+ this . context . menuActions . _notify ( force ) ;
4345 }
4446
4547 componentWillUnmount ( ) {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export default class MenuContext extends Component {
2727 closeMenu : ( ) => this . closeMenu ( ) ,
2828 toggleMenu : name => this . toggleMenu ( name ) ,
2929 isMenuOpen : ( ) => this . isMenuOpen ( ) ,
30- _notify : ( ) => this . _notify ( )
30+ _notify : force => this . _notify ( force )
3131 } ;
3232 const menuRegistry = this . _menuRegistry ;
3333 return { menuRegistry, menuActions } ;
You can’t perform that action at this time.
0 commit comments