web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Disable OnSelect for h...
Power Apps
Answered

Disable OnSelect for hidden List Box

(0) ShareShare
ReportReport
Posted on by 154

I've built a DropdownMenu Component for use across my various screens. It has a clickable Hamburger icon that toggles a List Box which serves as the drop down menu. I pass the component a table of Text/Screen pairs and it navigates the user to the desired screen. Works great! But...

 

Even when the List Box is hidden (Visible = false), I can't click on anything that's under it. I can see the controls that appear when the List Box is hidden, but if I click on them nothing happens. If I click on something that's outside the box of the component (the container for the hamburger and list box) it works fine.

 

Is there a way to make a control or container pass through if it's not visible?

 

Sample code available, if that helps.

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @BostonSailor 

    Use UpdateContext({vis:false}) In the OnSelect property of the control that you wish to make the other controls hidden.  Set the Visible property of the controls you wish hidden to "vis" (Including itself so that it disappears when you click it). 

    In the OnVisible property of the screen UpdateContext({vis:true}) to make the controls visible by default when the screen opens or UpdateContext({vis:false}) if you want them hidden by default. 

    Have at least one icon with a Visible property of !vis so that will be visible when the other controls are hidden and have its OnSelect property UpdateContext({vis:true}). so that you can unhide the controls that are not visible. 

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @BostonSailor ,

    Do you mean that the control 's onselect will not be triggered if it's put under the component even if the component is invisible?

    Could you show me

    1)your screenshoot of the component and the control?

    2)the settings of the related component and the control?

    I've made a similar test but not met the same problem like your description.

    I've put the control under the component. When the component is invisible, the button could be triggered.

    85.gif

     

    You could also consider put the controls in front of the component. Then it could be triggered no matter whether the component is visible.

    851.PNG

     

    If you want it be invisible when the component is visible, you just need to change its Visible based on component's visibility.

    For example:
    set the button's Visible:

    !Component1_1.Visible

     

     

     

    Best regards,

  • BostonSailor Profile Picture
    154 on at

    Thank you. That helped. I tried to reproduce my own problem, but couldn't. Not sure what I was or was not doing wrong, but it's all working now. A "hamburger" icon in the upper left that drops down (i.e. makes visible) a Gallery of menu choices. Click the hamburger again, and the Gallery/menu disappears. Previously, even when the Gallery was hidden, I couldn't click on the button underneath. But I revisited all the controls and validated their display order, etc. and it all works now as desired.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard