Card list - return to position

Is it possible to keep the scroll position for an inline cards list after viewing an item?

I have an horizontal scroll list of cards with about 16 cards and 3 on view at any 1 time. It’s frustrating that Glide resets the list position to always view the first 3 cards when going back after viewing any item.

Any tips?

1 Like

It’s been brought up before, but I don’t think there is an easy fix.

2 Likes

When scrolling vertically, you can click into details, and you come right back to the same point in the list that you were

In my, admittedly limited, experience, you do not come back to the same point in the list that you were. For me, as the list gets longer (50-100 items), the scroll position is off far enough that the edited card is not even on the screen after coming back from an edit… Even if it’s a pop-up form (Show Form Screen action). Am I doing something wrong?

I also experience some issues when scrolling vertically. Even if I do something simple like view details and then navigate back to the list… it moves around on me (most of the time)

We must be working on a similar project today! I got on the forum to specifically search this question because I was having the same issues. Horizontal scrolling makes much more sense in the app I’m making, but if it won’t return to my current position it makes it unusable in that orientation.

Well 1 year later and I think I have spotted a hack to make it work!

You can play for yourself using this link

1 Like

That’s an awful lot of columns…

Couldn’t you just create a single if-then-else column:

  • If Timestamp is empty, then Now
  • Else Timestamp

You still have your action that sets the timestamp, and then sort by the if-then-else column? :thinking:

Sounds like a nice simplification but would that keep the desired UX, e.g. the linear list is converted into a loop that always has the same sequence of elements but the start position changes.

If I understand correctly, your suggestion simply moves the last viewed item to the beginning of the linear list?

1 Like

ah, I see - you need to maintain the order.
Okay, I missed that.
hmm, will have a think and see what I can come up with.
Not because there’s anything wrong with your solution.
But, Tim Toady :wink:

1 Like

Thank you for the suggestion! I will have to watch this a few more times to grasp it all as I’m newer to Glide. Would this work with a filter applied as well? To be clear, I’m not asking if this could be done with a filter instead, I’m asking if it can be done while a filter is also applied. My app currently has a card deck that filters out a lot based on a previous user selection.

Yes it will work with any combination of filters. It doesn’t matter what filters you apply to the list.

Okay, so here’s my crack at it.
I wouldn’t say that it’s any simpler than your approach. But seeing as how I did open my big mouth I figured I needed to come up with something, haha :joy:

5 Likes

Love it! Also really nice :slight_smile: Folks might prefer your approach to avoid using dates & timestamps.

And compliments for the super clear talk through…

1 Like