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?
Can you show your editor with the RG in a screenshot. Pretty sure I can help clear this up.
How are you displaying cells? The entire list? Items 1-10?
Something like that?
Appreciate the response!
Here is a image of the RG:
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!
WHOA! Cool fix here worked out by mme and @brandon6
So what we did was .
give 1 single RG a few states
we also add 2 hidden inputs on the screen to create the required pagination indexes
they are set up like this to capture 1-10, 11-20, etc
we set up the RG to only show between start and end and used full list and only designed/showed 1 cell in the editor.
then its just a matter of moving through the index
on button click, the index is either raised or lowered by 1
the entire screen is short but fully expands with the list, the list that caps at 10!
This topic was automatically closed after 70 days. New replies are no longer allowed.