I’m trying to collapse a “fixed number of cells” repeating group when search results are lower than the fixed number. The reason I have the layout style set to fixed is because I have added a pagination feature and it will not work without that layout style set.
The issue: When search results are lower than 10, there is a large space between the repeating group and the pagination toggle. I’m trying to figure out how to collapse the extra space dynamically - depending on how many search results are show.
I’ve attached 2 zoomed out screenshots to explain the issue. Not sure how to fix this, can someone help me solve this?
As you can see, it’s currently set to fixed number of cells. I have also added a pagination feature at the bottom (which used the toolbox plugin “List of Numbers”). The pagination functionality works as expected - If I were to go to the second page I would see 1 listing, however, the space between the RG and pagination feature is extremely large.
Here’s my first quick idea. Put the fixed cell RG in a group and then place a full list RG of the exact same exactly over
Put both into groups that collapse height when they are invisible
For the full list, it should be as tall as 1 search result may be when placed on the editor screen.
Put the results of the search into a custom state. If less than 10 items will be shown, use a “full list” RG and keep the fixed cell RG hidden. If more than 10, do the reverse.
I’d hide pagination anytime results are less than 10 too. No need to show it if it’s not being used. It’ll help keep the screen clean too!