Forum Academy Marketplace Showcase Pricing Features

Help! How do I scroll to position of nested repeating group

Hi,

I’m building a marketplace app with a page which displays products using nested repeating groups.

The first repeating group provides the category of the product, and the second (nested) repeating group then displays all of the products for that given category.

When a user clicks on a product they are taken to a page with details of that product.

The issue I’m having is when the user returns to marketplace page I’d like the nested repeating group to retain its position - but there doesn’t seem a way to do this.

The ‘Scroll to entry’ action only seems to work on the top level RGs - when I try and set an workflow action (say on page load) and then use ‘scroll to entry’ i only can select the top level RG.

So far I’ve set it so that when the user clicks on the product I’m setting a custom state with the product value in it, and I’ve managed to put a button within each cell of the first RG which will scroll the second (nested) RG to the correct position - but obviously I want this to happen on page load, rather than a user clicking.

If anyone has any ideas how I can achieve this i’d be grateful - it must be a common issue for ecommerce/marketplace type builds.

Many thanks
Martin

2 Likes

Hello! I have noted the ability to scroll to entry for nested repeating groups as a feature request and have shared this with the engineering team. I will follow up with you if the team determines that this is something that is feasible for them to implement at this time!

2 Likes

I feel like I came across a similar problem, two ideas.

  1. When a user clicks on a product, it opens that page in a new tab (I’d almost expect that) and that way the original marketplace page stay in the correct scrolling position.

  2. If you really want to navigate away and come back, then that’s going to be more complicated. I’m a little surprised that the custom state is working for you as I thought it was wiped on every page load. What I would do is turn the nested RG into a reusable element and in that resuable element workflow, trigger a scroll to entry on page load when custom state is not empty and then scroll to the custom states value. The caveat to this is it will only work properly if a product isn’t duplicated between categories.

Hi Ikenna that would be amazing thank you. Even if you were able to set a starting position on load of the element would be good. That way I could save the last scroll position to a custom state. I’ve noted that as soon as I click on a product (app is single page - it will then show product page) it seems to reset the scroll position to zero as the product page loads which is a bit disconcerting for the user. Thanks Martin

Hi Juicebox - thanks for the reply. Interesting points. Not sure about opening product in a new tab as I know this can get a bit confusing for mobile users, but I’ll have a look into it.

The marketplace is a single page app so it isn’t actually changing pages, just changing what is shown/hidden to the user, which is why the custom states persist. I’ll definitely try your idea about using a reusable element - that may well work nicely. Unfortunately there are products shared amongst categories but I might be able to find a way around it.

Thanks for getting back to my post, much appreciated.
Cheers
Martin

Did you figure out a workaround for this? I just contacted support for the same problem and found out it is expected behavior. I would imagine plenty of use cases when nested elements would need to be referenced for the whole page.

For example, being able to have the same workflow run on all of these elements in the repeating group, or atleast the ones that meet the condition.

I want to achieve a scroll to effect on the comments of a post on the home feed for my app. Which is a pretty normal expectation I would think.

Not sure if there are other ways to achieve this, but the way I did it in other areas of the app was simply when that repeating group is visible.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.