{"action":"created","comment":{"url":"https://api.github.com/repos/Addepar/ember-widgets/pulls/comments/42024187","id":42024187,"diff_hunk":"@@ -349,11 +368,19 @@ Ember.AddeparMixins.ResizeHandlerMixin, Ember.Widgets.KeyboardHelper,\n     @set 'selection', content.findProperty(defaultPath)\n   , 'content.[]'\n \n-  selectableOptionsDidChange: Ember.observer ->\n+  ###*\n+  * Update highlighted item to the first option when the current highlighted\n+  * item does not exist.\n+  * @function\n+  ###\n+  updateHighlightedItem: ->\n     if @get('showDropdown')\n       highlighted = @get('highlighted')\n       if not @get('selectableOptions').contains(highlighted)\n         @set 'highlighted', @get('selectableOptions.firstObject')\n+\n+  selectableOptionsDidChange: Ember.observer ->","path":"src/select.coffee","position":147,"original_position":128,"commit_id":"13a4f6608e210bff0ff6ef152a6453ac674488fc","original_commit_id":"a94f6eb1a2a674b8b838f9ef43d678d0bf6ab62f","user":{"login":"thangdinh","id":8838366,"avatar_url":"https://avatars.githubusercontent.com/u/8838366?v=3","gravatar_id":"","url":"https://api.github.com/users/thangdinh","html_url":"https://github.com/thangdinh","followers_url":"https://api.github.com/users/thangdinh/followers","following_url":"https://api.github.com/users/thangdinh/following{/other_user}","gists_url":"https://api.github.com/users/thangdinh/gists{/gist_id}","starred_url":"https://api.github.com/users/thangdinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thangdinh/subscriptions","organizations_url":"https://api.github.com/users/thangdinh/orgs","repos_url":"https://api.github.com/users/thangdinh/repos","events_url":"https://api.github.com/users/thangdinh/events{/privacy}","received_events_url":"https://api.github.com/users/thangdinh/received_events","type":"User","site_admin":false},"body":"1. I didn't put an attempt to fix all of the observers in this component in this PR. I happened to find some of the observers are straightforward to be remove so I remove them. \r\n2. The reason of this observer (as part of the original solution) was to tackle the problem that the content of the selection is changed, for which the current highlighted item does not exist anymore. \r\nIt is not straightforward to build computed properties because here we need the highlighted index bound to the UI, while we need the highlighted item for other operations. With only highlighted index, we cannot know if the item is already removed or not. Something like that. I can explain in person when we want to remove this observer. ","created_at":"2015-10-14T17:24:17Z","updated_at":"2015-10-14T17:24:17Z","html_url":"https://github.com/Addepar/ember-widgets/pull/221#discussion_r42024187","pull_request_url":"https://api.github.com/repos/Addepar/ember-widgets/pulls/221","_links":{"self":{"href":"https://api.github.com/repos/Addepar/ember-widgets/pulls/comments/42024187"},"html":{"href":"https://github.com/Addepar/ember-widgets/pull/221#discussion_r42024187"},"pull_request":{"href":"https://api.github.com/repos/Addepar/ember-widgets/pulls/221"}}},"pull_request":{"url":"https://api.github.com/repos/Addepar/ember-widgets/pulls/221","id":47566251,"html_url":"https://github.com/Addepar/ember-widgets/pull/221","diff_url":"https://github.com/Addepar/ember-widgets/pull/221.diff","patch_url":"https://github.com/Addepar/ember-widgets/pull/221.patch","issue_url":"https://api.github.com/repos/Addepar/ember-widgets/issues/221","number":221,"state":"open","locked":false,"title":"Add ability for dropdown to be shown at the beginning","user":{"login":"thangdinh","id":8838366,"avatar_url":"https://avatars.githubusercontent.com/u/8838366?v=3","gravatar_id":"","url":"https://api.github.com/users/thangdinh","html_url":"https://github.com/thangdinh","followers_url":"https://api.github.com/users/thangdinh/followers","following_url":"https://api.github.com/users/thangdinh/following{/other_user}","gists_url":"https://api.github.com/users/thangdinh/gists{/gist_id}","starred_url":"https://api.github.com/users/thangdinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thangdinh/subscriptions","organizations_url":"https://api.github.com/users/thangdinh/orgs","repos_url":"https://api.github.com/users/thangdinh/repos","events_url":"https://api.github.com/users/thangdinh/events{/privacy}","received_events_url":"https://api.github.com/users/thangdinh/received_events","type":"User","site_admin":false},"body":"There are some use cases when we want to have dropdown shown by default, it's not currently supported. \r\nTests are added.\r\n@Addepar/fire ","created_at":"2015-10-13T17:56:01Z","updated_at":"2015-10-14T17:24:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf43e6b540a41b85a99933facfbf399eb98d80fd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Addepar/ember-widgets/pulls/221/commits","review_comments_url":"https://api.github.com/repos/Addepar/ember-widgets/pulls/221/comments","review_comment_url":"https://api.github.com/repos/Addepar/ember-widgets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Addepar/ember-widgets/issues/221/comments","statuses_url":"https://api.github.com/repos/Addepar/ember-widgets/statuses/13a4f6608e210bff0ff6ef152a6453ac674488fc","head":{"label":"Addepar:thang/fixDropdown","ref":"thang/fixDropdown","sha":"13a4f6608e210bff0ff6ef152a6453ac674488fc","user":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"repo":{"id":13793634,"name":"ember-widgets","full_name":"Addepar/ember-widgets","owner":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Addepar/ember-widgets","description":"","fork":false,"url":"https://api.github.com/repos/Addepar/ember-widgets","forks_url":"https://api.github.com/repos/Addepar/ember-widgets/forks","keys_url":"https://api.github.com/repos/Addepar/ember-widgets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Addepar/ember-widgets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Addepar/ember-widgets/teams","hooks_url":"https://api.github.com/repos/Addepar/ember-widgets/hooks","issue_events_url":"https://api.github.com/repos/Addepar/ember-widgets/issues/events{/number}","events_url":"https://api.github.com/repos/Addepar/ember-widgets/events","assignees_url":"https://api.github.com/repos/Addepar/ember-widgets/assignees{/user}","branches_url":"https://api.github.com/repos/Addepar/ember-widgets/branches{/branch}","tags_url":"https://api.github.com/repos/Addepar/ember-widgets/tags","blobs_url":"https://api.github.com/repos/Addepar/ember-widgets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Addepar/ember-widgets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Addepar/ember-widgets/git/refs{/sha}","trees_url":"https://api.github.com/repos/Addepar/ember-widgets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Addepar/ember-widgets/statuses/{sha}","languages_url":"https://api.github.com/repos/Addepar/ember-widgets/languages","stargazers_url":"https://api.github.com/repos/Addepar/ember-widgets/stargazers","contributors_url":"https://api.github.com/repos/Addepar/ember-widgets/contributors","subscribers_url":"https://api.github.com/repos/Addepar/ember-widgets/subscribers","subscription_url":"https://api.github.com/repos/Addepar/ember-widgets/subscription","commits_url":"https://api.github.com/repos/Addepar/ember-widgets/commits{/sha}","git_commits_url":"https://api.github.com/repos/Addepar/ember-widgets/git/commits{/sha}","comments_url":"https://api.github.com/repos/Addepar/ember-widgets/comments{/number}","issue_comment_url":"https://api.github.com/repos/Addepar/ember-widgets/issues/comments{/number}","contents_url":"https://api.github.com/repos/Addepar/ember-widgets/contents/{+path}","compare_url":"https://api.github.com/repos/Addepar/ember-widgets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Addepar/ember-widgets/merges","archive_url":"https://api.github.com/repos/Addepar/ember-widgets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Addepar/ember-widgets/downloads","issues_url":"https://api.github.com/repos/Addepar/ember-widgets/issues{/number}","pulls_url":"https://api.github.com/repos/Addepar/ember-widgets/pulls{/number}","milestones_url":"https://api.github.com/repos/Addepar/ember-widgets/milestones{/number}","notifications_url":"https://api.github.com/repos/Addepar/ember-widgets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Addepar/ember-widgets/labels{/name}","releases_url":"https://api.github.com/repos/Addepar/ember-widgets/releases{/id}","created_at":"2013-10-23T04:39:36Z","updated_at":"2015-09-21T21:30:25Z","pushed_at":"2015-10-14T09:31:44Z","git_url":"git://github.com/Addepar/ember-widgets.git","ssh_url":"git@github.com:Addepar/ember-widgets.git","clone_url":"https://github.com/Addepar/ember-widgets.git","svn_url":"https://github.com/Addepar/ember-widgets","homepage":null,"size":15997,"stargazers_count":267,"watchers_count":267,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":85,"mirror_url":null,"open_issues_count":41,"forks":85,"open_issues":41,"watchers":267,"default_branch":"master"}},"base":{"label":"Addepar:master","ref":"master","sha":"790ee190c2a858999ab36b57ce37d7b2917a8785","user":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"repo":{"id":13793634,"name":"ember-widgets","full_name":"Addepar/ember-widgets","owner":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Addepar/ember-widgets","description":"","fork":false,"url":"https://api.github.com/repos/Addepar/ember-widgets","forks_url":"https://api.github.com/repos/Addepar/ember-widgets/forks","keys_url":"https://api.github.com/repos/Addepar/ember-widgets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Addepar/ember-widgets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Addepar/ember-widgets/teams","hooks_url":"https://api.github.com/repos/Addepar/ember-widgets/hooks","issue_events_url":"https://api.github.com/repos/Addepar/ember-widgets/issues/events{/number}","events_url":"https://api.github.com/repos/Addepar/ember-widgets/events","assignees_url":"https://api.github.com/repos/Addepar/ember-widgets/assignees{/user}","branches_url":"https://api.github.com/repos/Addepar/ember-widgets/branches{/branch}","tags_url":"https://api.github.com/repos/Addepar/ember-widgets/tags","blobs_url":"https://api.github.com/repos/Addepar/ember-widgets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Addepar/ember-widgets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Addepar/ember-widgets/git/refs{/sha}","trees_url":"https://api.github.com/repos/Addepar/ember-widgets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Addepar/ember-widgets/statuses/{sha}","languages_url":"https://api.github.com/repos/Addepar/ember-widgets/languages","stargazers_url":"https://api.github.com/repos/Addepar/ember-widgets/stargazers","contributors_url":"https://api.github.com/repos/Addepar/ember-widgets/contributors","subscribers_url":"https://api.github.com/repos/Addepar/ember-widgets/subscribers","subscription_url":"https://api.github.com/repos/Addepar/ember-widgets/subscription","commits_url":"https://api.github.com/repos/Addepar/ember-widgets/commits{/sha}","git_commits_url":"https://api.github.com/repos/Addepar/ember-widgets/git/commits{/sha}","comments_url":"https://api.github.com/repos/Addepar/ember-widgets/comments{/number}","issue_comment_url":"https://api.github.com/repos/Addepar/ember-widgets/issues/comments{/number}","contents_url":"https://api.github.com/repos/Addepar/ember-widgets/contents/{+path}","compare_url":"https://api.github.com/repos/Addepar/ember-widgets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Addepar/ember-widgets/merges","archive_url":"https://api.github.com/repos/Addepar/ember-widgets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Addepar/ember-widgets/downloads","issues_url":"https://api.github.com/repos/Addepar/ember-widgets/issues{/number}","pulls_url":"https://api.github.com/repos/Addepar/ember-widgets/pulls{/number}","milestones_url":"https://api.github.com/repos/Addepar/ember-widgets/milestones{/number}","notifications_url":"https://api.github.com/repos/Addepar/ember-widgets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Addepar/ember-widgets/labels{/name}","releases_url":"https://api.github.com/repos/Addepar/ember-widgets/releases{/id}","created_at":"2013-10-23T04:39:36Z","updated_at":"2015-09-21T21:30:25Z","pushed_at":"2015-10-14T09:31:44Z","git_url":"git://github.com/Addepar/ember-widgets.git","ssh_url":"git@github.com:Addepar/ember-widgets.git","clone_url":"https://github.com/Addepar/ember-widgets.git","svn_url":"https://github.com/Addepar/ember-widgets","homepage":null,"size":15997,"stargazers_count":267,"watchers_count":267,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":85,"mirror_url":null,"open_issues_count":41,"forks":85,"open_issues":41,"watchers":267,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Addepar/ember-widgets/pulls/221"},"html":{"href":"https://github.com/Addepar/ember-widgets/pull/221"},"issue":{"href":"https://api.github.com/repos/Addepar/ember-widgets/issues/221"},"comments":{"href":"https://api.github.com/repos/Addepar/ember-widgets/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/Addepar/ember-widgets/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/Addepar/ember-widgets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Addepar/ember-widgets/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/Addepar/ember-widgets/statuses/13a4f6608e210bff0ff6ef152a6453ac674488fc"}}}}