airbnb / infinity

UITableViews for the web (DEPRECATED)
http://airbnb.io/infinity/
Other
2.8k stars 281 forks source link

Add a callback to load more elements into the feed #7

Closed reissbaker closed 11 years ago

reissbaker commented 11 years ago

This would make it easier to implement infinite feeds. Should be optional, since it's not necessary (or may not even be suitable) for every case, but could be used similar to the lazy callback.

DeaconDesperado commented 11 years ago

I'd be willing to work on this since it was what I was erroneously trying to use lazy for anyway =)

reissbaker commented 11 years ago

Hack away :)

DeaconDesperado commented 11 years ago

I've almost got a pull req for the callback for adding more elements together. Would you prefer there be a separate callback for adding and removing a preloader? I was figuring in the case of ajax for a data fetch, the end user could put the preloader logic into the success and beforeSend for the ajax call... prob don't need a separate callback in this API, right?

http://snips.deacondesperado.com/infinity_demo/demo.html

DeaconDesperado commented 11 years ago

I added a pull req at issue #11 - sorry for the dupe.

reissbaker commented 11 years ago

No worries -- lookin' good. More comments on the pull req itself.