On my site I’m displaying a repeating group displaying a list of jobs, that loads more jobs as the user scrolls down. I’m showing a message “Scroll down to see more jobs”, but I’d like to show it only when there were more jobs to show. Would that be possible?
It’s not exactly what I’m looking for. More jobs are already displayed when the user scrolls down, without the need for a “show more” button. But at first, only 3 jobs are shown and it can seem like there’s only 3 jobs. That’s why I’m showing that “Scroll down to see more jobs” message.
The problem is that that shows always, even when there’s no more jobs to show, and I don’t know how to show it only if there’s more jobs to be loaded. It can be confusing to always show it. Especially when a user does a search, 5 jobs are found and the message is still telling her to scroll down.
Is there a way to get the number of things in a list that are loaded?
So what you do is something like a condition which says show text only when index number is < total jobs (and add what every query conditions are on this).
Yes, it returns the count of all the elements in the list, including the ones that haven’t been shown yet.
I also tried to use the index number, but that can only be accessed from inside de cell of the Repeating Group, and I’d like to display the message under the RG, not in every cell
Just checked and my use case was slightly different, what is does need is a way of counting the visible rows, but I don’t think that is currently possible.
@emmanuel do you know if there’s a way to count the number of visible rows in a RG with Ext. Vertical Scrolling? I’d use this to show a message “Scroll down to see more items” or not (when all the items would have been shown). Thanks!
Look at this example from @Ralph
I use this in my app, this is what you want. There is no need to display scroll down for more, it will simply load more when scrolled down. Use a full list until: not extended vertical scroll.
I know it will simply load more when scrolled down, the message its just show to give some clues to users. Because when loading the page, only 3 jobs appear, and some visitors may think “oh, that’s it, bye”. So that’s the reason to show the message
I can’t use a full list: until and controlling the until with the scroll position and hacking some formula with the height of the rows. Why? That height changes depending on the device type (bigger on mobiles) and also when expanding one of the jobs, that would not work at all. You can see what I mean playing with the site in 1 s
And I would like to NOT display the ‘scroll down to see more’ when there’s actually nothing else to be displayed, but can’t quite figure out how to do that yet
No I can’t “see what you mean” you are not making any sense. With a full list it will show there is more items because the list will go past the page. Ralph does not use hack. Height of rows does not matter with this example.
I hadn’t looked into the link you had sent too deeply. I thought @Ralph was using the scolling position that comes with Bubble by default and that wouldn’t work for me, but I’ve looked again and he’s using this On Screen Detector plugin, pretty cool.
Apparently it lets you create an event when the user reaches a certain element, so that would solve my problem.