{"action":"created","issue":{"url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/827","repository_url":"https://api.github.com/repos/lorenzofox3/Smart-Table","labels_url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/827/comments","events_url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/827/events","html_url":"https://github.com/lorenzofox3/Smart-Table/issues/827","id":289541567,"number":827,"title":"st-sort-default=\"true\" is not working fine with custom sort","user":{"login":"sarawut-p","id":2382992,"avatar_url":"https://avatars3.githubusercontent.com/u/2382992?v=4","gravatar_id":"","url":"https://api.github.com/users/sarawut-p","html_url":"https://github.com/sarawut-p","followers_url":"https://api.github.com/users/sarawut-p/followers","following_url":"https://api.github.com/users/sarawut-p/following{/other_user}","gists_url":"https://api.github.com/users/sarawut-p/gists{/gist_id}","starred_url":"https://api.github.com/users/sarawut-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarawut-p/subscriptions","organizations_url":"https://api.github.com/users/sarawut-p/orgs","repos_url":"https://api.github.com/users/sarawut-p/repos","events_url":"https://api.github.com/users/sarawut-p/events{/privacy}","received_events_url":"https://api.github.com/users/sarawut-p/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-18T08:22:24Z","updated_at":"2018-05-11T21:50:55Z","closed_at":null,"author_association":"NONE","body":"AngularJs version - 1.5.2\r\nSmart table version - 2.1.10\r\n\r\nAs in the following example, if we use st-sort-default=\"true\" on \r\n\r\n`<th st-sort=\"getters.firstName\">first name</th>`\r\n\r\nThe default sort is not working fine on first load\r\n\r\n```\r\n<table st-table=\"rowCollection\" class=\"table table-striped\">\r\n\t<thead>\r\n\t<tr>\r\n\t\t<th st-sort=\"getters.firstName\">first name</th>\r\n\t\t<th st-sort=\"lastName\">last name</th>\r\n\t\t<th st-sort=\"birthDate\">birth date</th>\r\n\t\t<th st-sort=\"balance\" st-skip-natural=\"true\" >balance</th>\r\n\t\t<th>email</th>\r\n\t</tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t<tr ng-repeat=\"row in rowCollection\">\r\n\t\t<td>{{row.firstName | uppercase}}</td>\r\n\t\t<td>{{row.lastName}}</td>\r\n\t\t<td>{{row.birthDate | date}}</td>\r\n\t\t<td>{{row.balance | currency}}</td>\r\n\t\t<td><a ng-href=\"mailto:{{row.email}}\">email</a></td>\r\n\t</tr>\r\n\t</tbody>\r\n</table>\r\n app.controller('sortCtrl', ['$scope', '$filter', function (scope, filter) {\r\n    scope.rowCollection = [\r\n        {firstName: 'Laurent', lastName: 'Renard', birthDate: new Date('1987-05-21'), balance: 102, email: 'whatever@gmail.com'},\r\n        {firstName: 'Blandine', lastName: 'Faivre', birthDate: new Date('1987-04-25'), balance: -2323.22, email: 'oufblandou@gmail.com'},\r\n        {firstName: 'Francoise', lastName: 'Frere', birthDate: new Date('1955-08-27'), balance: 42343, email: 'raymondef@gmail.com'}\r\n    ];\r\n\r\n    scope.getters={\r\n        firstName: function (value) {\r\n            //this will sort by the length of the first name string\r\n            return value.firstName.length;\r\n        }\r\n    }\r\n}]);\r\n```"},"comment":{"url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/comments/388494779","html_url":"https://github.com/lorenzofox3/Smart-Table/issues/827#issuecomment-388494779","issue_url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/827","id":388494779,"user":{"login":"MrWook","id":20294042,"avatar_url":"https://avatars1.githubusercontent.com/u/20294042?v=4","gravatar_id":"","url":"https://api.github.com/users/MrWook","html_url":"https://github.com/MrWook","followers_url":"https://api.github.com/users/MrWook/followers","following_url":"https://api.github.com/users/MrWook/following{/other_user}","gists_url":"https://api.github.com/users/MrWook/gists{/gist_id}","starred_url":"https://api.github.com/users/MrWook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrWook/subscriptions","organizations_url":"https://api.github.com/users/MrWook/orgs","repos_url":"https://api.github.com/users/MrWook/repos","events_url":"https://api.github.com/users/MrWook/events{/privacy}","received_events_url":"https://api.github.com/users/MrWook/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T21:50:55Z","updated_at":"2018-05-11T21:50:55Z","author_association":"CONTRIBUTOR","body":"Hello @foxdog05000,\r\n\r\nmaybe you create a working [plnkr](https://plnkr.co/edit/?p=catalogue) for that issue"}}
{"actor":{"display_login":"MrWook"}}