{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/26","labels_url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/26/comments","events_url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/26/events","html_url":"https://github.com/angular-ui/ui-scroll/issues/26","id":110305828,"number":26,"title":"Cannot 'reload' the list at a specified point in the middle of the scroll list.","user":{"login":"jeanettehead","id":1103787,"avatar_url":"https://avatars.githubusercontent.com/u/1103787?v=3","gravatar_id":"","url":"https://api.github.com/users/jeanettehead","html_url":"https://github.com/jeanettehead","followers_url":"https://api.github.com/users/jeanettehead/followers","following_url":"https://api.github.com/users/jeanettehead/following{/other_user}","gists_url":"https://api.github.com/users/jeanettehead/gists{/gist_id}","starred_url":"https://api.github.com/users/jeanettehead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeanettehead/subscriptions","organizations_url":"https://api.github.com/users/jeanettehead/orgs","repos_url":"https://api.github.com/users/jeanettehead/repos","events_url":"https://api.github.com/users/jeanettehead/events{/privacy}","received_events_url":"https://api.github.com/users/jeanettehead/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-07T20:06:51Z","updated_at":"2015-10-07T21:37:34Z","closed_at":null,"body":"I would like to be able to 'reload' the infinite scroll list at a certain point in the list.\r\n\r\nSomething like adapter.reload({startIndex: 12}) to load the list starting at location 12\r\n\r\nI played around with this in the ui scroll code and got this working without changing a lot of code.  Is this something that it would make sense to (clean, test, and then...) submit a pull request for?"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/comments/146340410","html_url":"https://github.com/angular-ui/ui-scroll/issues/26#issuecomment-146340410","issue_url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/26","id":146340410,"user":{"login":"jeanettehead","id":1103787,"avatar_url":"https://avatars.githubusercontent.com/u/1103787?v=3","gravatar_id":"","url":"https://api.github.com/users/jeanettehead","html_url":"https://github.com/jeanettehead","followers_url":"https://api.github.com/users/jeanettehead/followers","following_url":"https://api.github.com/users/jeanettehead/following{/other_user}","gists_url":"https://api.github.com/users/jeanettehead/gists{/gist_id}","starred_url":"https://api.github.com/users/jeanettehead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeanettehead/subscriptions","organizations_url":"https://api.github.com/users/jeanettehead/orgs","repos_url":"https://api.github.com/users/jeanettehead/repos","events_url":"https://api.github.com/users/jeanettehead/events{/privacy}","received_events_url":"https://api.github.com/users/jeanettehead/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T21:37:34Z","updated_at":"2015-10-07T21:37:34Z","body":"The demo is helpful - thanks for the link.  One advantage this might have the demo would be the ability $index of the item in ui scroll to match the index of the item in the list.  If you refresh the demo the $indicies are different than the item numbers.  It's also, as you said, easy to call it from the reload method.  I am using ui-scroll right now in a place where I'm going 'down' and 'up' into different scrollable lists (like a file tree).\r\n\r\nHere's the reload method I spiked out that works for me:\r\n```\r\nreload = (options) ->\r\n\tdismissPendingRequests()\r\n\tfirst = 1\r\n\tnext = 1\r\n#this is new\r\n\tif (options && options.index)  #bad code. need to make sure index is an integer, not that its falsy\r\n\t\tnext = options.index\r\n\tremoveFromBuffer(0, buffer.length)\r\n#this is new (next -1)\r\n\tbuilder.topPadding(next - 1)\r\n\tbuilder.bottomPadding(next - 1)\r\n\teof = false\r\n\tbof = false\r\n\tadjustBuffer ridActual\r\n```\r\n\r\nI used an object because there are several things that get set in the function: `start`, `next`, `eof`, `bof`.  Having just an integer offset parameter would work just as well for this scenario."}}