File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const MenuWithDrilldown: React.FunctionComponent = () => {
2626 } ;
2727
2828 const setHeight = ( menuId : string , height : number ) => {
29- if ( menuHeights [ menuId ] === undefined ) {
29+ if ( menuHeights [ menuId ] === undefined || ( menuId !== 'drilldown-rootMenu' && menuHeights [ menuId ] !== height ) ) {
3030 setMenuHeights ( { ...menuHeights , [ menuId ] : height } ) ;
3131 }
3232 } ;
Original file line number Diff line number Diff line change @@ -55,11 +55,13 @@ export const MenuWithDrilldownBreadcrumbs: React.FunctionComponent = () => {
5555 setDrilldownPath ( pathSansLast ) ;
5656 setActiveMenu ( toMenuId ) ;
5757 } ;
58+
5859 const setHeight = ( menuId : string , height : number ) => {
59- if ( ! menuHeights [ menuId ] ) {
60+ if ( menuHeights [ menuId ] === undefined || ( menuId !== 'breadcrumbs-rootMenu' && menuHeights [ menuId ] !== height ) ) {
6061 setMenuHeights ( { ...menuHeights , [ menuId ] : height } ) ;
6162 }
6263 } ;
64+
6365 const drillIn = ( fromMenuId : string , toMenuId : string , pathId : string ) => {
6466 setMenuDrilledIn ( [ ...menuDrilledIn , fromMenuId ] ) ;
6567 setDrilldownPath ( [ ...drilldownPath , pathId ] ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const MenuWithDrilldownSubmenuFunctions: React.FunctionComponent = () =>
2626 } ;
2727
2828 const setHeight = ( menuId : string , height : number ) => {
29- if ( menuHeights [ menuId ] === undefined ) {
29+ if ( menuHeights [ menuId ] === undefined || ( menuId !== 'functions-rootMenu' && menuHeights [ menuId ] !== height ) ) {
3030 setMenuHeights ( { ...menuHeights , [ menuId ] : height } ) ;
3131 }
3232 } ;
You can’t perform that action at this time.
0 commit comments