{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ng-grid/issues/3209","labels_url":"https://api.github.com/repos/angular-ui/ng-grid/issues/3209/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ng-grid/issues/3209/comments","events_url":"https://api.github.com/repos/angular-ui/ng-grid/issues/3209/events","html_url":"https://github.com/angular-ui/ng-grid/issues/3209","id":66202909,"number":3209,"title":"pagination occasionally cuts off last few rows of last page","user":{"login":"ktiedt","id":97242,"avatar_url":"https://avatars.githubusercontent.com/u/97242?v=3","gravatar_id":"","url":"https://api.github.com/users/ktiedt","html_url":"https://github.com/ktiedt","followers_url":"https://api.github.com/users/ktiedt/followers","following_url":"https://api.github.com/users/ktiedt/following{/other_user}","gists_url":"https://api.github.com/users/ktiedt/gists{/gist_id}","starred_url":"https://api.github.com/users/ktiedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktiedt/subscriptions","organizations_url":"https://api.github.com/users/ktiedt/orgs","repos_url":"https://api.github.com/users/ktiedt/repos","events_url":"https://api.github.com/users/ktiedt/events{/privacy}","received_events_url":"https://api.github.com/users/ktiedt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/ng-grid/labels/waiting-response","name":"waiting-response","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-03T18:24:59Z","updated_at":"2015-05-15T21:25:37Z","closed_at":null,"body":"I realize this is kind of a bad bug report since I am unable to consistently make this happen outside my application, however I have tracked down the code that is causing the problem and am hoping that someone more in touch with that particular code can maybe offer an explanation or better thoughts on why this is happening.\r\n\r\nThe problematic line of code is here: (snippet below) https://github.com/angular-ui/ng-grid/blob/58a27fc5bb798af3cae57be202bfed5017a6f191/src/js/core/factories/GridRenderContainer.js#L423\r\n\r\n```\r\n rangeEnd = Math.min(rowCache.length, rowIndex + minRows + self.grid.options.excessRows);\r\n```\r\n\r\nwhich equates in our case:\r\n```\r\n rangeEnd = Math.min(25, [6 || 9] + 10 + 4);\r\n```\r\nThis causes our final page to either display 20 or 23 rows... cutting off the last 2-5 rows out of our 200..\r\n\r\nOur temporary work around was to increase excessRows to ensure that 25 was always the minimum value... \r\n\r\nAlternatively we also found that these options worked to \"fix\" the problem too:\r\n disabling virtualization  (set its value to our max row count)\r\nincrease virtualization threshold to between 1 and 2 times our page size (25-50)\r\n\r\nThis is on Angular 1.3.14 and both ui-grid unstable from yesterday afternoon and the last ui-grid release 3.0.0-RC.18-7774d30"},"comment":{"url":"https://api.github.com/repos/angular-ui/ng-grid/issues/comments/102528816","html_url":"https://github.com/angular-ui/ng-grid/issues/3209#issuecomment-102528816","issue_url":"https://api.github.com/repos/angular-ui/ng-grid/issues/3209","id":102528816,"user":{"login":"ktiedt","id":97242,"avatar_url":"https://avatars.githubusercontent.com/u/97242?v=3","gravatar_id":"","url":"https://api.github.com/users/ktiedt","html_url":"https://github.com/ktiedt","followers_url":"https://api.github.com/users/ktiedt/followers","following_url":"https://api.github.com/users/ktiedt/following{/other_user}","gists_url":"https://api.github.com/users/ktiedt/gists{/gist_id}","starred_url":"https://api.github.com/users/ktiedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktiedt/subscriptions","organizations_url":"https://api.github.com/users/ktiedt/orgs","repos_url":"https://api.github.com/users/ktiedt/repos","events_url":"https://api.github.com/users/ktiedt/events{/privacy}","received_events_url":"https://api.github.com/users/ktiedt/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T21:25:37Z","updated_at":"2015-05-15T21:25:37Z","body":"I have tried to no avail to produce it in a plunkr, that is why I resorted to turning it into a math problem to see where it was failing for us. \r\n\r\nI know, that the typical response is, 'then its not a bug', perhaps the only thing I have not tried, is isolating the CSS for the grid, however, that is a monumental task in this project (to disable any non ui-grid CSS that may be throwing off calculations).\r\n\r\nMy team is 'ok' with any of the fixes we found (adjusting the options) but it would be amazing to nail down the exact cause of it and remove the need for a bandaid."}}