{"action":"created","issue":{"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/84","labels_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/84/comments","events_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/84/events","html_url":"https://github.com/Semantic-Org/Semantic-UI-Ember/issues/84","id":127781047,"number":84,"title":"Dropdown get selected object","user":{"login":"denchen","id":2073768,"avatar_url":"https://avatars.githubusercontent.com/u/2073768?v=3","gravatar_id":"","url":"https://api.github.com/users/denchen","html_url":"https://github.com/denchen","followers_url":"https://api.github.com/users/denchen/followers","following_url":"https://api.github.com/users/denchen/following{/other_user}","gists_url":"https://api.github.com/users/denchen/gists{/gist_id}","starred_url":"https://api.github.com/users/denchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denchen/subscriptions","organizations_url":"https://api.github.com/users/denchen/orgs","repos_url":"https://api.github.com/users/denchen/repos","events_url":"https://api.github.com/users/denchen/events{/privacy}","received_events_url":"https://api.github.com/users/denchen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-20T20:51:24Z","updated_at":"2016-01-22T23:53:51Z","closed_at":null,"body":"In the notes for pull #46 , it offers a way to bind to an object for a dropdown. But how do I get the object selected? For instance, if I have this template:\r\n\r\n```\r\n{{#ui-dropdown class=\"fluid selection dropdown\" selected=selectedOption}}\r\n    <i class=\"dropdown icon\"></i>\r\n    <span class=\"default text\">Select something</span>\r\n    <div class=\"menu\">\r\n        {{#each items as |item|}}\r\n        {{#ui-dropdown-item content=item}}\r\n            {{item.name}}\r\n        {{/ui-dropdown-item}}\r\n        {{/each}}\r\n    </div>\r\n{{/ui-dropdown}}\r\n```\r\n\r\nAnd in my controller I have:\r\n\r\n```\r\nitems: [{ id: 0, name: 'AAA' }, { id: 1, name: 'BBB' }, { id: 2, name: 'CCC' }],\r\nheardSelected: function () {\r\n    var selectedOption = this.get('selectedOption');\r\n    console.log('Heard dropdown change:');\r\n    console.log('selectedOption');\r\n    console.log('id: ' + selectedOption.id);\r\n    console.log('name: ' + selectedOption.name);\r\n    console.log('properties: ' + selectedOption.keys());\r\n}.observes('selectedOption');\r\n```\r\n\r\nWhen I select an item from the dropdown, this is what I see in the console:\r\n\r\n```\r\nselected: \r\nHeard dropdown change: \r\napplication.js:26 [object Object]\r\napplication.js:27 id: undefined\r\napplication.js:28 name: undefined\r\napplication.js:29 Uncaught TypeError: selectedOption.keys is not a function\r\n```"},"comment":{"url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/comments/174092363","html_url":"https://github.com/Semantic-Org/Semantic-UI-Ember/issues/84#issuecomment-174092363","issue_url":"https://api.github.com/repos/Semantic-Org/Semantic-UI-Ember/issues/84","id":174092363,"user":{"login":"denchen","id":2073768,"avatar_url":"https://avatars.githubusercontent.com/u/2073768?v=3","gravatar_id":"","url":"https://api.github.com/users/denchen","html_url":"https://github.com/denchen","followers_url":"https://api.github.com/users/denchen/followers","following_url":"https://api.github.com/users/denchen/following{/other_user}","gists_url":"https://api.github.com/users/denchen/gists{/gist_id}","starred_url":"https://api.github.com/users/denchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denchen/subscriptions","organizations_url":"https://api.github.com/users/denchen/orgs","repos_url":"https://api.github.com/users/denchen/repos","events_url":"https://api.github.com/users/denchen/events{/privacy}","received_events_url":"https://api.github.com/users/denchen/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T23:53:51Z","updated_at":"2016-01-22T23:53:51Z","body":"Yeah, this is something I would like, in part because I'm using data pulled in from `this.store.findAll()`, and each item has other properties I'd like to access if selected. The workaround I have is to create a standard ui-dropdown with `data-value` keyed on `item.id` and then once selected do a lookup of `id` in our original model. Not ideal, but it works."}}