{"action":"created","issue":{"url":"https://api.github.com/repos/vaadin/flow/issues/3759","repository_url":"https://api.github.com/repos/vaadin/flow","labels_url":"https://api.github.com/repos/vaadin/flow/issues/3759/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/flow/issues/3759/comments","events_url":"https://api.github.com/repos/vaadin/flow/issues/3759/events","html_url":"https://github.com/vaadin/flow/issues/3759","id":308265149,"number":3759,"title":"Grid.Column.setSortProperty does nothing for in-memory data providers","user":{"login":"mvysny","id":254091,"avatar_url":"https://avatars3.githubusercontent.com/u/254091?v=4","gravatar_id":"","url":"https://api.github.com/users/mvysny","html_url":"https://github.com/mvysny","followers_url":"https://api.github.com/users/mvysny/followers","following_url":"https://api.github.com/users/mvysny/following{/other_user}","gists_url":"https://api.github.com/users/mvysny/gists{/gist_id}","starred_url":"https://api.github.com/users/mvysny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvysny/subscriptions","organizations_url":"https://api.github.com/users/mvysny/orgs","repos_url":"https://api.github.com/users/mvysny/repos","events_url":"https://api.github.com/users/mvysny/events{/privacy}","received_events_url":"https://api.github.com/users/mvysny/received_events","type":"User","site_admin":false},"labels":[{"id":205765017,"url":"https://api.github.com/repos/vaadin/flow/labels/bug","name":"bug","color":"fc2929","default":true},{"id":616612244,"url":"https://api.github.com/repos/vaadin/flow/labels/components","name":"components","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/vaadin/flow/milestones/82","html_url":"https://github.com/vaadin/flow/milestone/82","labels_url":"https://api.github.com/repos/vaadin/flow/milestones/82/labels","id":3212273,"number":82,"title":"1.0 Maintenance","description":"Bug backlog for Flow and component Java APIs 1.0 (included in V10)","creator":{"login":"pleku","id":1478381,"avatar_url":"https://avatars1.githubusercontent.com/u/1478381?v=4","gravatar_id":"","url":"https://api.github.com/users/pleku","html_url":"https://github.com/pleku","followers_url":"https://api.github.com/users/pleku/followers","following_url":"https://api.github.com/users/pleku/following{/other_user}","gists_url":"https://api.github.com/users/pleku/gists{/gist_id}","starred_url":"https://api.github.com/users/pleku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pleku/subscriptions","organizations_url":"https://api.github.com/users/pleku/orgs","repos_url":"https://api.github.com/users/pleku/repos","events_url":"https://api.github.com/users/pleku/events{/privacy}","received_events_url":"https://api.github.com/users/pleku/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":0,"state":"open","created_at":"2018-03-23T14:06:08Z","updated_at":"2018-03-26T09:37:05Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-03-24T14:05:10Z","updated_at":"2018-03-26T10:59:59Z","closed_at":null,"author_association":"NONE","body":"When I call `Grid.Column.setSortProperty(\"foo\")` I expect the `ListDataProvider` to sort by the property as well.\r\n\r\nCurrently, the `setSortProperty` makes the column sortable but leaves the default comparator as-is. The old comparator always returns 0 and so it does not perform any actual sorting. Therefore setting sort property will only take effect for the “external backend” DataProvider and it will do nothing with in-memory DataProvider such as `ListDataProvider`. The setSortProperty() should therefore also call setComparator() with appropriate comparator as well."},"comment":{"url":"https://api.github.com/repos/vaadin/flow/issues/comments/376127576","html_url":"https://github.com/vaadin/flow/issues/3759#issuecomment-376127576","issue_url":"https://api.github.com/repos/vaadin/flow/issues/3759","id":376127576,"user":{"login":"Legioth","id":1294657,"avatar_url":"https://avatars2.githubusercontent.com/u/1294657?v=4","gravatar_id":"","url":"https://api.github.com/users/Legioth","html_url":"https://github.com/Legioth","followers_url":"https://api.github.com/users/Legioth/followers","following_url":"https://api.github.com/users/Legioth/following{/other_user}","gists_url":"https://api.github.com/users/Legioth/gists{/gist_id}","starred_url":"https://api.github.com/users/Legioth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Legioth/subscriptions","organizations_url":"https://api.github.com/users/Legioth/orgs","repos_url":"https://api.github.com/users/Legioth/repos","events_url":"https://api.github.com/users/Legioth/events{/privacy}","received_events_url":"https://api.github.com/users/Legioth/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T10:59:59Z","updated_at":"2018-03-26T10:59:59Z","author_association":"MEMBER","body":"Sorting based on a property name, e.g. `\"foo\"`, would require using reflection to find a corresponding getter and then hope the return type of that getter is `Comparable`.  The problem here is that we won't necessarily even have a `Class` instance for the item type and we can thus not even do any reflection stuff until acting on actual item instances, which might each have a different `getClass()` return value that just happens to be sharing a common super class."}}
{"actor":{"display_login":"Legioth"}}