Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Flexible height gallery doesn't adjust

Hello, here's what I'm trying to make: I want to make an "accordion" style nested gallery similar to what's shown in this video: Power Apps Accordion Gallery (Expand/Collapse Gallery) - YouTube. The user should be able to click items in the parent gallery to expand its child gallery. They should be able to click it again to hide it. Everything should shift up and down accordingly to conserve space. 


Here's my issue: the galleries don't seem to be adjusting like they are in the YouTube video. Both the parent and child galleries are flexible height galleries. When a child gallery item isn't visible, it just leaves a big white space as shown below.


Screenshot 2022-08-05 155144.png-mh.png

Super User
Super User

Doing this is very frustrating thing to work with. You got to basically make sure you build in the height of the child gallery from how many items you have in that child gallery. So the Height Property of child gallery is set to something like "CountRows(Self.AllItems) * 50" or the height of your child item site needs to be. So 50 in my case. In your case you would attach that to your minimize effect. So the height would be on a condition saying 0 if no items in it, else CountRows(Self.AllItems) * 50  etc. 


You can't really get a double auto adjustment unfortunately. At least from my experience, and you got to get it close based on setting the child gallery size which the parent adjusts too is the only way  I could get it to work, and even that video I believe has that mixed in there. 


Good luck! I've lost some hair trying to get these things working right! 

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,506)