{"action":"closed","issue":{"url":"https://api.github.com/repos/mariuszfoltak/angular2-datatable/issues/10","repository_url":"https://api.github.com/repos/mariuszfoltak/angular2-datatable","labels_url":"https://api.github.com/repos/mariuszfoltak/angular2-datatable/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/mariuszfoltak/angular2-datatable/issues/10/comments","events_url":"https://api.github.com/repos/mariuszfoltak/angular2-datatable/issues/10/events","html_url":"https://github.com/mariuszfoltak/angular2-datatable/issues/10","id":152567544,"number":10,"title":"Datatable not updating on data change.","user":{"login":"RicardoVaranda","id":6951312,"avatar_url":"https://avatars.githubusercontent.com/u/6951312?v=3","gravatar_id":"","url":"https://api.github.com/users/RicardoVaranda","html_url":"https://github.com/RicardoVaranda","followers_url":"https://api.github.com/users/RicardoVaranda/followers","following_url":"https://api.github.com/users/RicardoVaranda/following{/other_user}","gists_url":"https://api.github.com/users/RicardoVaranda/gists{/gist_id}","starred_url":"https://api.github.com/users/RicardoVaranda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RicardoVaranda/subscriptions","organizations_url":"https://api.github.com/users/RicardoVaranda/orgs","repos_url":"https://api.github.com/users/RicardoVaranda/repos","events_url":"https://api.github.com/users/RicardoVaranda/events{/privacy}","received_events_url":"https://api.github.com/users/RicardoVaranda/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-02T14:41:41Z","updated_at":"2016-05-02T15:11:47Z","closed_at":"2016-05-02T15:11:47Z","body":"Basically I am loading the data with async and for some reason the data of the table is not loading that way:\r\n\r\n```\r\n    constructor(private userService : UserService){\r\n        Cookie.setCookie('RADLOGINUSERNAME','ricardo');\r\n        let user = '';\r\n        self = this;\r\n\r\n        userService.getDirectReports(Cookie.getCookie('RADLOGINUSERNAME'))\r\n            .subscribe(res => {\r\n                //For some reason object data is within the result object\r\n                let res = res.data;\r\n\r\n                this.user = res.dn;\r\n\r\n                res.directReports.forEach(function(user, i){\r\n                    self.data.push({\r\n                        name : user,\r\n                        accountExpiry : res.reportInfo[i][0],\r\n                        passwordExpiry: res.reportInfo[i][1],\r\n                        accountLocked : res.reportInfo[i][2],\r\n                        status : 'Idle'\r\n                    })\r\n                });\r\n                console.log(self.data);\r\n            });\r\n\r\n    }\r\n```\r\n\r\n\r\n```\r\n<table class=\"table table-hover\" [mfData]=\"data\" #mf=\"mfDataTable\">\r\n    <thead>\r\n        <tr>\r\n            <th></th>\r\n            <th>Student Name</th>\r\n            <th>Account Expiry</th>\r\n            <th>Password Expiry</th>\r\n            <th>Account Locked</th>\r\n            <th>Changes</th>\r\n        </tr>\r\n    </thead>\r\n    <tbody>\r\n    <tr *ngFor=\"let user of mf.data\">\r\n        <td>\r\n            <input class=\"checkBox\" id=\"{{id}}Checkbox\" ng-click=\"handleClick(id, dn)\" type=\"checkbox\">\r\n        </td>\r\n        <td>\r\n            <div id=\"{{id}}PassErrors\">\r\n                {{dnToFullName(user.name)}}\r\n                <span ng-show=\"errors\" id=\"{{id}}Errors\" style=\"color:red\"></span>\r\n            </div>\r\n        </td>\r\n        <td>\r\n            <span id=\"{{id}}AccExp\" class=\"label label-default\">{{user.accountExpiry}}</span>\r\n        </td>\r\n        <td>\r\n            <span id=\"{{id}}PassExp\" class=\"label label-default\">{{user.passwordExpiry}}</span>\r\n        </td>\r\n        <td>\r\n            <div ng-if=\"locked !== \\\\\"><span id=\"{{id}}LockedStatus\" class=\"label label-danger\">Locked</span></div>\r\n        </td>\r\n        <td>\r\n            <span id=\"{{id}}Status\" class=\"label label-default\">Idle</span>\r\n        </td>\r\n    </tr>\r\n    </tbody>\r\n</table>\r\n```\r\n\r\nEdit:\r\n\r\nOn my AppComponent class is where I have the data array as follows:\r\n\r\n\r\ndata = [{\r\n      name : 'test',\r\n      accountExpiry : '10/10/10'\r\n}];\r\n\r\nThe data that was loaded statically loads fine but the rest of the data that is pushed into it later once it gets it from the userservice never gets displayed on the table."}}