Coder Social home page Coder Social logo

Comments (4)

albertovasquez avatar albertovasquez commented on June 19, 2024 1

This request is a nice one .. basically to have infinityLoader accept either next page and append to model or previous page and prepend to model.

I'm doing something similar to OP. In which we keep page in query params. So on a refresh it will start with the proper page on the route model hook. And we know when we reach top of scroll so we want to fetch and scroll to page -1. Infinite scroll functionality shouldn't be a forward only limitation.

Thanks for the great addon.

from ember-infinity.

hhff avatar hhff commented on June 19, 2024

This sounds a lot more like pagination than infinite scroll.

However, you could use the infinityLoader component to do this - but send actions to be caught be the pagination route instead. infinityLoader allows you to pass in the action name that it fires when it's in view, so you could just fire an action to the pagination route instead of infinityLoad.

Let me know if this doesn't properly answer your Question!

from ember-infinity.

davidgoli avatar davidgoli commented on June 19, 2024

For people who want this functionality out of a component, I recommend looking at https://github.com/runspired/smoke-and-mirrors which is a more scalable scroll view and is direction-agnostic - supports loading in the front or end of the list, and even loading 2d grids.

from ember-infinity.

albertovasquez avatar albertovasquez commented on June 19, 2024

Yes @davidgoli the funny thing is I'm using both together as I love the mixin used with ember-infinity

from ember-infinity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.