{"action":"created","issue":{"url":"https://api.github.com/repos/swimlane/ngx-datatable/issues/138","repository_url":"https://api.github.com/repos/swimlane/ngx-datatable","labels_url":"https://api.github.com/repos/swimlane/ngx-datatable/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/swimlane/ngx-datatable/issues/138/comments","events_url":"https://api.github.com/repos/swimlane/ngx-datatable/issues/138/events","html_url":"https://github.com/swimlane/ngx-datatable/issues/138","id":178390779,"number":138,"title":"Server pagination not working","user":{"login":"SnakeB","id":22350026,"avatar_url":"https://avatars2.githubusercontent.com/u/22350026?v=3","gravatar_id":"","url":"https://api.github.com/users/SnakeB","html_url":"https://github.com/SnakeB","followers_url":"https://api.github.com/users/SnakeB/followers","following_url":"https://api.github.com/users/SnakeB/following{/other_user}","gists_url":"https://api.github.com/users/SnakeB/gists{/gist_id}","starred_url":"https://api.github.com/users/SnakeB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnakeB/subscriptions","organizations_url":"https://api.github.com/users/SnakeB/orgs","repos_url":"https://api.github.com/users/SnakeB/repos","events_url":"https://api.github.com/users/SnakeB/events{/privacy}","received_events_url":"https://api.github.com/users/SnakeB/received_events","type":"User","site_admin":false},"labels":[{"id":403504504,"url":"https://api.github.com/repos/swimlane/ngx-datatable/labels/Investigate","name":"Investigate","color":"fbca04","default":false},{"id":420855407,"url":"https://api.github.com/repos/swimlane/ngx-datatable/labels/Need%20More%20Info","name":"Need More Info","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":41,"created_at":"2016-09-21T16:00:43Z","updated_at":"2017-04-08T21:58:26Z","closed_at":null,"body":"Pagination and Sorting should be handled through the server. To load my data from the backend I´m using the following method:\n\n```\nthis.loadData('sortColumn', 'ASC', this.currentPage, this.options.limit)\n        .subscribe(ratings => {\n        this.rows = [];\n        this.rows.push(...ratings.ratings);\n        this.endRow = this.options.limit * (this.options.offset + 1);\n        this.maxRows = ratings.recordsTotal;\n        if (this.maxRows < this.options.limit) {\n          this.endRow = this.maxRows;\n        } else if (this.maxRows < this.endRow) {\n          this.endRow = this.maxRows;\n        }\n        this.options.count = this.maxRows;\n  }, error => this.errorMessage = <any>error);}\n```\n\nthis.rows is the variable I´m binding to the data-table-template:\n\n`<datatable class=\"rating_table\" [rows]='rows' [options]='options' (onRowClick)='onRowClick($event)' (onPageChange)='onPage($event)'>`\n\nMy problem is when I´m loading the first page the data binding ( this.rows.push(...ratings.ratings))  works and in the table my ratings are shown, but when I´m loading the second page the new ratings are saved into the this.rows object but the table is not refreshing the ratings from page one are still visible.  \n"},"comment":{"url":"https://api.github.com/repos/swimlane/ngx-datatable/issues/comments/292748492","html_url":"https://github.com/swimlane/ngx-datatable/issues/138#issuecomment-292748492","issue_url":"https://api.github.com/repos/swimlane/ngx-datatable/issues/138","id":292748492,"user":{"login":"rob-balfre","id":2623102,"avatar_url":"https://avatars3.githubusercontent.com/u/2623102?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-balfre","html_url":"https://github.com/rob-balfre","followers_url":"https://api.github.com/users/rob-balfre/followers","following_url":"https://api.github.com/users/rob-balfre/following{/other_user}","gists_url":"https://api.github.com/users/rob-balfre/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-balfre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-balfre/subscriptions","organizations_url":"https://api.github.com/users/rob-balfre/orgs","repos_url":"https://api.github.com/users/rob-balfre/repos","events_url":"https://api.github.com/users/rob-balfre/events{/privacy}","received_events_url":"https://api.github.com/users/rob-balfre/received_events","type":"User","site_admin":false},"created_at":"2017-04-08T21:58:26Z","updated_at":"2017-04-08T21:58:26Z","body":"@amcdnl thanks so much,  really appreciate  it.  I'll give it a go today."}}
{"actor":{"display_login":"rob-balfre"}}