I am trying to add a load more button to the repeating group on my bubble app. I understand that the best way to do this is with a custom state and workflows, but my issue is that since it is a chat app, I would need to see the last messages first so I am unable to use the items until # expression since it shows the first X messages in the chat and not the last 15.
If I was able to use a formula in the data source then I could potentially do :items until # Messages Count - Chat Custom State Number but I am unable to do this.
Hi there, I have yet to explore this myself, but I do know there are some plugins that effectively reverse repeating groups, specifically for chat functions. As I haven’t used any I don’t have any to recommend, but this may be a direction to explore for now.
I agree, though it’s a common sentiment that list manipulation can be lacking with vanilla Bubble. But plugins are also part of what makes Bubble so powerful, as long as they’re not overused.
I hear reversing a list is possible with Javascript…but you’d have to supply the Javascript, something the plugin does automatically (and ideally gives you more function, depending on the plugin).
While you are here - I had another question related to repeating groups. Do you know how I can set a database trigger to automatically scroll to the bottom of the repeating group when a new message is added? The database trigger event only works on the backend workflow which doesn’t allow me to use the scroll to action.
Instead of a database trigger, could you use a count against a custom state to trigger? When the count of messages in the repeating group is greater than (custom state, set to previous count of messages), scroll to bottom?