{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/186","repository_url":"https://api.github.com/repos/angular-ui/ui-scroll","labels_url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/186/comments","events_url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/186/events","html_url":"https://github.com/angular-ui/ui-scroll/issues/186","id":268448028,"number":186,"title":"applyUpdates to last index of buffer/datasource adds extra padding","user":{"login":"zacronos","id":3067460,"avatar_url":"https://avatars3.githubusercontent.com/u/3067460?v=4","gravatar_id":"","url":"https://api.github.com/users/zacronos","html_url":"https://github.com/zacronos","followers_url":"https://api.github.com/users/zacronos/followers","following_url":"https://api.github.com/users/zacronos/following{/other_user}","gists_url":"https://api.github.com/users/zacronos/gists{/gist_id}","starred_url":"https://api.github.com/users/zacronos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zacronos/subscriptions","organizations_url":"https://api.github.com/users/zacronos/orgs","repos_url":"https://api.github.com/users/zacronos/repos","events_url":"https://api.github.com/users/zacronos/events{/privacy}","received_events_url":"https://api.github.com/users/zacronos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-10-25T15:41:53Z","updated_at":"2017-10-26T21:28:56Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I have a scenario where at times I will add or remove a single element at the end of my data source.  \r\n\r\nWhen adding the element, it seems like `adapter.append()` is not the ideal choice, since that always adds to the end of the buffer, and I don't have any way to find out if the element should be in the buffer or not (as far as I know, I can use the adapter to find out what's currently visible, but not what's currently in the buffer beyond what's visible).  So I must use `adapter.applyUpdates()` to add the element.  It also seems that `adapter.applyUpdates()` is the only way to delete an element, so it is necessary then too.\r\n\r\nIf I do this append when at EOF, some additional padding gets added to the bottom of the list.  If I append multiple times, the padding size multiplies as well.  If I scroll far away and come back, the padding disappears.\r\n\r\nIf I scroll to EOF, then scroll far away from it, then do the delete, then scroll back to EOF, I see similar padding added.  This does not happen when deleting while at EOF, and I'm fairly certain this also does not happen when deleting before having ever scrolled to EOF.\r\n\r\nHere is a plunker which demonstrates both of these behaviors: https://plnkr.co/edit/Q5nPKIxRnEqnZpBKqrvJ\r\n\r\nI see there is some refactoring happening in this area of the code ( #184 ), however I have tried using the code from that branch and the behavior seems to be the same."},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/comments/339806474","html_url":"https://github.com/angular-ui/ui-scroll/issues/186#issuecomment-339806474","issue_url":"https://api.github.com/repos/angular-ui/ui-scroll/issues/186","id":339806474,"user":{"login":"dhilt","id":4365660,"avatar_url":"https://avatars3.githubusercontent.com/u/4365660?v=4","gravatar_id":"","url":"https://api.github.com/users/dhilt","html_url":"https://github.com/dhilt","followers_url":"https://api.github.com/users/dhilt/followers","following_url":"https://api.github.com/users/dhilt/following{/other_user}","gists_url":"https://api.github.com/users/dhilt/gists{/gist_id}","starred_url":"https://api.github.com/users/dhilt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhilt/subscriptions","organizations_url":"https://api.github.com/users/dhilt/orgs","repos_url":"https://api.github.com/users/dhilt/repos","events_url":"https://api.github.com/users/dhilt/events{/privacy}","received_events_url":"https://api.github.com/users/dhilt/received_events","type":"User","site_admin":false},"created_at":"2017-10-26T21:28:56Z","updated_at":"2017-10-26T21:28:56Z","author_association":"MEMBER","body":"@zacronos I started [new branch](https://github.com/angular-ui/ui-scroll/tree/paddings-cache) where I play with out-of-buffer Paddings cache changes. I was able to succesfully complete first simplest operation: removing the non-top item. I made a [demo](https://github.com/angular-ui/ui-scroll/tree/paddings-cache/demo/outOfBuffer), it will not work from rawgit, because I didn't commit distributive, so it needs to be run locally... I will try to continue this work."}}
{"actor":{"display_login":"dhilt"}}