Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Custom component side menu default opened

(1) ShareShare
ReportReport
Posted on by 541 Super User 2025 Season 1

I have created a custom component particular for sidemenu that is collapsible by a hamburger icon.

I copied the logic from Creator Kit which functions perfectly but mine doesnt. I don't see any difference in the codes but I am wondering why mine isnt opened by default. 

I'll first put here the properties/codes for the Creator Kit -  ExpandMenu - custom component.
This is attached to a new app with nothing entered on any of the App's properties(OnStart).

kej_0-1720880067455.png

 

 

 

 

 

 

ExpandMenu Width = If(!Self.IsExpanded, 46, 221)

ExpandMenu.DefaultExpanded -- raise OnReset when value changed enabled = true

ExpandMenu.OnReset = Set(IsOpen, ExpandMenu.DefaultExpanded)

ExpandMenu.IsExpanded (output property) = IsOpen


Hamburger icon OnSelect = Set(IsOpen, !IsOpen) 

 

 

 

 

 

 

all of the above code works and the side menu by default is opened. Code below will be my own custom menu that I copied the logic but doesn't work.

 

 

 

 

 

SideMenu_Collapsible.Width = If(
 SideNavigation_Collapsible.MenuExpanded, 
 250, 
 70
)

SideMenu_Collapsible.DefaultExpand = true

SideMenu_Collapsible.OnReset -- raise OnReset when value changed enabled = Set(varMenuExpanded, SideMenu_Collapsible.DefaultExpand)

SideMenu_Collapsible.MenuExpanded (output property) = varMenuExpanded

Hamburger Icon OnSelect = Set(varMenuExpanded, !varMenuExpanded)

 

 

 

 

 

kej_1-1720880925198.png

Image above is the default when the app is first opened

kej_2-1720881014807.png

 

now this is the default of the side menu of the other app. Everything is basically similar.
why is my custom side menu not opened by default???

I noticed that the only difference between two apps are mine are enclosed with containers and the other app isn't. I dont know if this should affect anything but might as well indicate it here.

 

  • KevinGador Profile Picture
    541 Super User 2025 Season 1 on at
    Re: Custom component side menu default opened

    I have tried resetting before in the OnStart property of the app but I can't reset the component and thought that Resetting the component is impossible in any properties.

    Also, I have tried what you suggested and it worked! I guess its a lesson learned that I should not assume that it won't work automatically if it doesnt work with a certain property...

    Thanks a lot! 

  • Verified answer
    VeGETzX Profile Picture
    364 on at
    Re: Custom component side menu default opened

    When the app was just launch, variable varMenuExpanded, inside the component is still Blank even you have set DefaultExpand to true

    VeGETzX_0-1720888425730.png

     

    So, all condition reference to this variable will be false and this cause your side menu open in collapse mode

     

    As per my try, this seem to fix the problem, just add Reset() function to screen OnVisible() to reset the component if is MenuExpanded value is Blank

     

    Screen1.OnVisible = If(
     SideNavigation_Collapsible_3.MenuExpanded = Blank(),
     Reset(SideNavigation_Collapsible_3)
    )

     

    VeGETzX_2-1720889784941.png

     

    However, still didn't find the cause why there is no issue with Creator Kit component. I will keep you posted if I found any clue.

     

    Hope this help!

  • KevinGador Profile Picture
    541 Super User 2025 Season 1 on at
    Re: Custom component side menu default opened

    here it is. Please do let me know if you have downloaded the zip file already. 🙂 


    Edit: removed it. 

  • KevinGador Profile Picture
    541 Super User 2025 Season 1 on at
    Re: Custom component side menu default opened

    oh I thought you wanted this one. 
    okay wait let me just create the zip file for it.

  • VeGETzX Profile Picture
    364 on at
    Re: Custom component side menu default opened

     

    I'm not sure if I got anything wrong, but I only see the component named ExpandMenu (it's expanded by default).

    Can I have the component that you created which doesn't work?

    VeGETzX_0-1720885617929.png

     

  • KevinGador Profile Picture
    541 Super User 2025 Season 1 on at
    Re: Custom component side menu default opened

    yes sure 

  • VeGETzX Profile Picture
    364 on at
    Re: Custom component side menu default opened

    Hi @kej 

     

    Is it possible to export the app .zip that contains just the component and upload it here?

    So I can import to my environment and try debugging.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard