question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do you have any plans for making a two-way infinitely scrollable view?

See original GitHub issue

There are several things I’d like to make infinitely scrollable:

  • Calendars
  • Lists of documents sorted by date

In both of these cases I want to be able to scroll as far into the past or future as possible, but since <Grid> isn’t really designed to scroll up above row 0, it would take some kind of hacks to enable that.

For use cases like this, I think it’s probably better for the scroll container to wrap around when it reaches the bottom or top, but maintain a “virtual” scroll position. Then the scroll container could pass its virtual scroll bounds (top/bottom/left/right) to a function I provide that decides what to render for those bounds.

But maybe that should just be a separate package…what do you think?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
claudericcommented, May 12, 2017

@jedwards1211 For what it’s worth, you could check out what the Angular Material team came up with for inspiration, sounds quite similar to what you’re describing. If I recall correctly, it works by listening to mousewheel events and translating a container with translate3d, and can “scroll” infinitely in both directions. Check out this infinite scrolling datepicker for reference: https://material.angularjs.org/1.1.2/demo/datepicker

It doesn’t feel quite as perfect as native scrolling, but it’s pretty close. The differences are mostly noticeable when scrolling really fast.

1reaction
jedwards1211commented, May 13, 2017

@clauderic ah I see, yeah, that’s a good point that it’s usually no problem to restrict the min date. Well it’s certainly possible to add a way to jump to a given year and month without sacrificing the infinite scrolling in a datepicker. My initial inspiration for this came from the macOS calendar, which I think is pretty nice. (Interestingly, it treats slow scrolling and fast flicks as separate gestures, for the latter it aligns to the prev/next month.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native: How To Build Bidirectional Infinite Scroll
This section will walk you through the hurdles of implementing bidirectional infinite scroll and how we solved them.
Read more >
Two way infinite scroll react native - Stack Overflow
I'm making a "todo" view for a calendar application. When you scroll down to the end of the list, it grabs upcoming events...
Read more >
Timeline marker and two-way infinite scroll #8577 - GitHub
Describe the solution you'd like. A timeline marker that I can use to jump back to the original location in the infinite scroll....
Read more >
How to Create an Infinite UIScroll View - YouTube
In this video, you will learn the very foundation of creating an infinite UIScrollView that you can apply to UICollectionViews and ...
Read more >
Build a Vue INFINITE SCROLLING Component - YouTube
If you ' ve ever caught yourself on social media for way too long, chances are the site you were on was using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found