cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RiccoHipp1903
Helper III
Helper III

Component doesn't work as intended

Hello guys, hello @RezaDorrani ,

 

I used this videos Power Apps Navigation Menu Component (2 level menu) - YouTube Component for my

 App. The Problem was in the first place, i tried to build it by my own, like 4 times. Each time it didn't worked in any way. So I downloaded his component and imported it into my app. It works now pretty well in that app (Import it from my app into another keeps messing with that again)

But thats not the point sorry.

 

I adjust the Component to Shrink in size and not be visible or invisible. for that i did the following changes:

 

Navigation.MenuWidth

If(showMenu, Navigation.SetMenuWidth,icoMenu_1.Width+rectShape_1.Width)

gal_SubMenu

showMenu

 

The Problem is, if I start the App, it looks always like this 

RiccoHipp1903_0-1653285747423.png

The second Menu isn't Invisible. I have to activate the menu and shrink it again to look like this 

RiccoHipp1903_1-1653285891800.png

What am I doing wrong?

2 ACCEPTED SOLUTIONS

Accepted Solutions
iAm_ManCat
Super User
Super User

is the variable for showing the menu set when you load the App? if the variable hasn't been initialised yet then it won't know how to deal with it, try setting it during the first page of the app's OnVisible

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

RiccoHipp1903
Helper III
Helper III

@iAm_ManCat and @RezaDorrani ,

 

The key element was the showMenu as @iAm_ManCat said. 

 

If you want to show the side menu with Icons and don't want to set the Gallery invisible you have to check the showMenu at first Place.

 

The following code in the Second Level Gallery in the visible property needed to change from 

showMenu

 to

If(showMenu = Blank(),false, showMenu)

 

I attached the Component here 

View solution in original post

3 REPLIES 3
iAm_ManCat
Super User
Super User

is the variable for showing the menu set when you load the App? if the variable hasn't been initialised yet then it won't know how to deal with it, try setting it during the first page of the app's OnVisible

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Hello @iAm_ManCat ,

 

the variables are all set inside the component. through the click on the hamburger icon the following happen 

UpdateContext({showMenu: !showMenu})

the Variable showMenu isnt known in the App self

RiccoHipp1903
Helper III
Helper III

@iAm_ManCat and @RezaDorrani ,

 

The key element was the showMenu as @iAm_ManCat said. 

 

If you want to show the side menu with Icons and don't want to set the Gallery invisible you have to check the showMenu at first Place.

 

The following code in the Second Level Gallery in the visible property needed to change from 

showMenu

 to

If(showMenu = Blank(),false, showMenu)

 

I attached the Component here 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (4,581)