
Announcements
Hello everyone, I am addressing an issue with the TemplateSize of the Gallery in Power Apps.
The application operates such that when selecting a company first-aid kit from the main page to perform a check-up. Upon navigating to the new page, a next gallery displays the contents of the first-aid kit.
However, the problem arises not when selecting the first Aid kit, but during the selecting of second or third the Aid kit —> the entire gallery seems to collapse into a cluster, as illustrated in the attached image. The gallery then corrects itself when I click on this cluster.
I suspect the issue is caused by the automatic resizing of the TemplateSize, which you can find detailed below.
But the strange thing is that this cluster is forming randomly, and I can't figure out why..
Can anyone advise how to solve this problem?
TamplateSize of Gallery:
If(
TextPopup,
Title1 .Height + TextInput1_1.Height,
Title1 .Height
)
OnVisible of Screen: Set(TextPopup, false)
Hi @Zizlik ,
Are you using a regular gallery (not a flexible height gallery?), if so, unfotunately I have also experienced that issue three years ago, apparently, they still did not fix the issue.
But what worked for me is using the Flexible Height gallery. You don't even have to have a formula for the TemplateSize because it adjusts automatically.
What I suggest is replacing your existing gallery with a flexible height gallery. Copy the existing contents and paste it in the new flexible gallery. Rename the new gallery into the old gallery name after you have deleted it (so you don't have the redo all the formulas that depend on it). The trick here is setting the TemplateSize into 0 after you put all the contents in. If you do not want to show some items in the gallery, you make it invisible and the gallery will adjust for you.
You can try to reproduce a flexible gallery using the steps in the link below:
Power Apps - How to make an accordion or expandable gallery