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

Expandable Gallery -- can only select first two items

Hello,

 

@v-siky-msft kindly helped with building an expander gallery but for some reason I can only select and open the first two items in the expanded group.  I think it may have something to do with the height of the subgallery or main gallery.  This is what I have for the heights. 

 

MainGallery Height:  564

SubGallery Height:  If(expandCollapse && ThisItem.IsSelected,CountRows(ThisItem.Grouped)*80,05)

 

When I change the subgallery height to 500, for example, the groups do not collapse, but I can select all the items.

 

Any ideas or suggestions?

 

Many thanks!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @LYNCHJL ,

 

It seems that the items at the bottom of sub-gallery cannot be selected due to the gallery is not high enough.

 

The height of sub-gallery is configured by 'CountRows(ThisItem.Grouped)*80' code, that means the unit items height is 80, the total sub-gallery height is Unit height times the number of items. The advantage is that each sub-gallery Height is not fixed, depending on the number of Items.

If you want to increase the sub-gallery height, just try to increase the unit item height, e.g. increase from 80 to 160. 

If(expandCollapse && ThisItem.IsSelected,CountRows(ThisItem.Grouped)*160,05)

Or Use the Fixed Height, e.g. 500

If(expandCollapse && ThisItem.IsSelected,500,05)

Hope this helps.

Sik

View solution in original post

2 REPLIES 2
Resolver I
Resolver I

There may be two things going on:

  1. The Main Gallery is not a flexible-height gallery and is instead a standard gallery. The Standard gallery is going to restrict the visibility of the subgallery items based on the mainGallery.templateSize property. This can be okay if you always want the subGallery to only show 5 items at a time tops and then scroll when there are more but IMO the flexible-height gallery has a cleaner presentation to just expand all-the way to show all the items.
  2. If the main gallery is in fact a flexible height gallery, then the next thing could be that subGallery.templateSize is not configured to properly display all the content. The mainGallery templateSize now doesn't matter because the flex-height just changes per row of the master gallery based on it's content height so the content now governs how much space it needs. Based on your formula it seems like you want the subGallery row item to be a height of 80px so make sure that subGallery.templateSize is equal to 80.
    1. I would also set subGallery.templatePadding to 0 because this cause the scrollbar to appear when you don't want it to, otherwise adjust the subGallery.height and subGallery.templateSize to account for the padding.
Community Support
Community Support

Hi @LYNCHJL ,

 

It seems that the items at the bottom of sub-gallery cannot be selected due to the gallery is not high enough.

 

The height of sub-gallery is configured by 'CountRows(ThisItem.Grouped)*80' code, that means the unit items height is 80, the total sub-gallery height is Unit height times the number of items. The advantage is that each sub-gallery Height is not fixed, depending on the number of Items.

If you want to increase the sub-gallery height, just try to increase the unit item height, e.g. increase from 80 to 160. 

If(expandCollapse && ThisItem.IsSelected,CountRows(ThisItem.Grouped)*160,05)

Or Use the Fixed Height, e.g. 500

If(expandCollapse && ThisItem.IsSelected,500,05)

Hope this helps.

Sik

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,298)