cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Horizontal gallery's navigation buttons don't work unless you scroll to the second item

Hi,

 

I'm having this issue with the horizontal gallery control wherein the navigation buttons don't work unless I move to the second item first using the scrollbar. Once the second item is selected, then the buttons start working.

 

Has anyone else encountered this?  Is there a fix for it?

 

Thanks.

24 REPLIES 24
Highlighted
Helper I
Helper I

Hello,

 

Just came to say I'm having the same problem with my horizontal gallery. Been searching for a solution for a few hours now. 

 

The only thing I can say for certain is that I have a label in gallery called Gallery2.VisibleIndex. 

 

When my navigation works fine, the gallery starts with the visible index at 1. When my navigation does not work the visible index starts at 0. 

If I change the navigation step to 2 it does work. 

The gallery navigation works on the first load, then if you go to another page and come back (I had a problem of the gallery not scrolling back to the top, so I cleared the collection and recollected) it does not work when that happens. 

I read another post where someone mentioned setting the visible index to a variable and then setting the gallery default to said variable, but I couldn't quite understand what to do in this situation. 

 

Edit: I have also tried to Reset(Gallery) on the visible page. This gallery is coming from a collection. 

I have also tried Collect() on the Home Page button and on the on visual screen of the gallery page. 

Highlighted

Thanks @jbaggett, setting the navigation step seemed to work for me!  When I set it back to 1, it works in the PowerApps Studio, but not after I publish the app.  The other horizontal gallery within the app doesn't have any issues, which is odd.

Highlighted
Frequent Visitor

Whole day i was not able to fix this button, solution is so simple that i should not mention how much time i spend to get it.

If in play mode your horizontal gallery  navigation button dosnt work. ( showScroll = false , showNavigation = true ) 

For a quick fix, change your gallery like below.


NavigationStep = If(yourGalleryName.VisibleIndex = 0, 2, 1)

 

Highlighted
Frequent Visitor

The issue is that gallery cant handle to jump from index 0 to 2 with navigation step = 1. if you look at galleryVisible index in edit mode, it starts from 1, in play mode from 0... in my opinion it shouldn't be like that.

Highlighted

Thanks @Adam1986 for the formula.  Just in case you didn't know, PowerApps released the Self reference.  So you can reference the gallery without looking for the name:

 

NavigationStep = If(Self.VisibleIndex = 0, 2, 1)

 

Went half way through my app before I found out that it was released.  Been saving us a lot of time

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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