{"action":"opened","number":77,"pull_request":{"url":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls/77","id":29849690,"html_url":"https://github.com/mizzao/meteor-autocomplete/pull/77","diff_url":"https://github.com/mizzao/meteor-autocomplete/pull/77.diff","patch_url":"https://github.com/mizzao/meteor-autocomplete/pull/77.patch","issue_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/77","number":77,"state":"open","locked":false,"title":"Starting point for implementation of key field","user":{"login":"dovrosenberg","id":4704591,"avatar_url":"https://avatars.githubusercontent.com/u/4704591?v=3","gravatar_id":"","url":"https://api.github.com/users/dovrosenberg","html_url":"https://github.com/dovrosenberg","followers_url":"https://api.github.com/users/dovrosenberg/followers","following_url":"https://api.github.com/users/dovrosenberg/following{/other_user}","gists_url":"https://api.github.com/users/dovrosenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/dovrosenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dovrosenberg/subscriptions","organizations_url":"https://api.github.com/users/dovrosenberg/orgs","repos_url":"https://api.github.com/users/dovrosenberg/repos","events_url":"https://api.github.com/users/dovrosenberg/events{/privacy}","received_events_url":"https://api.github.com/users/dovrosenberg/received_events","type":"User","site_admin":false},"body":"I post this not as a proposed robust solution, but rather as a starting point for further work.  I've implemented a simple version of a \"key\" field in the autocomplete.\r\n\r\nWhat it does:\r\n* Allows a \"key\" attribute in the settings which specifies a key field in the collection\r\n* Whenever an item is selected in the list, there is a 'key' property added to the input which contains the key value that matches the selected item\r\n* As you type in the input, the key is cleared to ensure it only exists if an item in the collection was selected\r\n* The template can then have an \"initialKey\" parameter passed in, and the matching item from the collection will be pre-populated into the input\r\n\r\nWhere it falls down (among other places, I'm sure):\r\n* I've hardcoded the selection to tie to rules[0]... worked for my use case, but obviously not a good solution\r\n* I haven't fully thought through how this should work for any scenario other than whole-field replacement\r\n\r\nJust figured I'd share since I made it this far...","created_at":"2015-02-23T21:57:42Z","updated_at":"2015-02-23T21:57:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls/77/commits","review_comments_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls/77/comments","review_comment_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/77/comments","statuses_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/statuses/479e284bae5b1c14f37b5bd0a5b1f1e874b04cd1","head":{"label":"dovrosenberg:POC_of_key_functionality","ref":"POC_of_key_functionality","sha":"479e284bae5b1c14f37b5bd0a5b1f1e874b04cd1","user":{"login":"dovrosenberg","id":4704591,"avatar_url":"https://avatars.githubusercontent.com/u/4704591?v=3","gravatar_id":"","url":"https://api.github.com/users/dovrosenberg","html_url":"https://github.com/dovrosenberg","followers_url":"https://api.github.com/users/dovrosenberg/followers","following_url":"https://api.github.com/users/dovrosenberg/following{/other_user}","gists_url":"https://api.github.com/users/dovrosenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/dovrosenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dovrosenberg/subscriptions","organizations_url":"https://api.github.com/users/dovrosenberg/orgs","repos_url":"https://api.github.com/users/dovrosenberg/repos","events_url":"https://api.github.com/users/dovrosenberg/events{/privacy}","received_events_url":"https://api.github.com/users/dovrosenberg/received_events","type":"User","site_admin":false},"repo":{"id":30831554,"name":"meteor-autocomplete","full_name":"dovrosenberg/meteor-autocomplete","owner":{"login":"dovrosenberg","id":4704591,"avatar_url":"https://avatars.githubusercontent.com/u/4704591?v=3","gravatar_id":"","url":"https://api.github.com/users/dovrosenberg","html_url":"https://github.com/dovrosenberg","followers_url":"https://api.github.com/users/dovrosenberg/followers","following_url":"https://api.github.com/users/dovrosenberg/following{/other_user}","gists_url":"https://api.github.com/users/dovrosenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/dovrosenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dovrosenberg/subscriptions","organizations_url":"https://api.github.com/users/dovrosenberg/orgs","repos_url":"https://api.github.com/users/dovrosenberg/repos","events_url":"https://api.github.com/users/dovrosenberg/events{/privacy}","received_events_url":"https://api.github.com/users/dovrosenberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dovrosenberg/meteor-autocomplete","description":"Client/server autocompletion designed for Meteor's collections and reactivity.","fork":true,"url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete","forks_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/forks","keys_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/teams","hooks_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/hooks","issue_events_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/issues/events{/number}","events_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/events","assignees_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/assignees{/user}","branches_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/branches{/branch}","tags_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/tags","blobs_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/git/refs{/sha}","trees_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/statuses/{sha}","languages_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/languages","stargazers_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/stargazers","contributors_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/contributors","subscribers_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/subscribers","subscription_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/subscription","commits_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/commits{/sha}","git_commits_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/git/commits{/sha}","comments_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/comments{/number}","issue_comment_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/issues/comments{/number}","contents_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/contents/{+path}","compare_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/merges","archive_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/downloads","issues_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/issues{/number}","pulls_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/pulls{/number}","milestones_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/milestones{/number}","notifications_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/labels{/name}","releases_url":"https://api.github.com/repos/dovrosenberg/meteor-autocomplete/releases{/id}","created_at":"2015-02-15T15:34:40Z","updated_at":"2015-02-22T19:33:13Z","pushed_at":"2015-02-23T21:49:24Z","git_url":"git://github.com/dovrosenberg/meteor-autocomplete.git","ssh_url":"git@github.com:dovrosenberg/meteor-autocomplete.git","clone_url":"https://github.com/dovrosenberg/meteor-autocomplete.git","svn_url":"https://github.com/dovrosenberg/meteor-autocomplete","homepage":"","size":268,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mizzao:master","ref":"master","sha":"8698bf05e3c460f0d300fec871140fb5c8bb563d","user":{"login":"mizzao","id":2080084,"avatar_url":"https://avatars.githubusercontent.com/u/2080084?v=3","gravatar_id":"","url":"https://api.github.com/users/mizzao","html_url":"https://github.com/mizzao","followers_url":"https://api.github.com/users/mizzao/followers","following_url":"https://api.github.com/users/mizzao/following{/other_user}","gists_url":"https://api.github.com/users/mizzao/gists{/gist_id}","starred_url":"https://api.github.com/users/mizzao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mizzao/subscriptions","organizations_url":"https://api.github.com/users/mizzao/orgs","repos_url":"https://api.github.com/users/mizzao/repos","events_url":"https://api.github.com/users/mizzao/events{/privacy}","received_events_url":"https://api.github.com/users/mizzao/received_events","type":"User","site_admin":false},"repo":{"id":12966709,"name":"meteor-autocomplete","full_name":"mizzao/meteor-autocomplete","owner":{"login":"mizzao","id":2080084,"avatar_url":"https://avatars.githubusercontent.com/u/2080084?v=3","gravatar_id":"","url":"https://api.github.com/users/mizzao","html_url":"https://github.com/mizzao","followers_url":"https://api.github.com/users/mizzao/followers","following_url":"https://api.github.com/users/mizzao/following{/other_user}","gists_url":"https://api.github.com/users/mizzao/gists{/gist_id}","starred_url":"https://api.github.com/users/mizzao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mizzao/subscriptions","organizations_url":"https://api.github.com/users/mizzao/orgs","repos_url":"https://api.github.com/users/mizzao/repos","events_url":"https://api.github.com/users/mizzao/events{/privacy}","received_events_url":"https://api.github.com/users/mizzao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mizzao/meteor-autocomplete","description":"Client/server autocompletion designed for Meteor's collections and reactivity.","fork":false,"url":"https://api.github.com/repos/mizzao/meteor-autocomplete","forks_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/forks","keys_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/teams","hooks_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/hooks","issue_events_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/events{/number}","events_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/events","assignees_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/assignees{/user}","branches_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/branches{/branch}","tags_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/tags","blobs_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/git/refs{/sha}","trees_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/statuses/{sha}","languages_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/languages","stargazers_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/stargazers","contributors_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/contributors","subscribers_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/subscribers","subscription_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/subscription","commits_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/commits{/sha}","git_commits_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/git/commits{/sha}","comments_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/comments{/number}","issue_comment_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/comments{/number}","contents_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/contents/{+path}","compare_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/merges","archive_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/downloads","issues_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues{/number}","pulls_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls{/number}","milestones_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/milestones{/number}","notifications_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/labels{/name}","releases_url":"https://api.github.com/repos/mizzao/meteor-autocomplete/releases{/id}","created_at":"2013-09-20T05:59:32Z","updated_at":"2015-02-19T21:56:09Z","pushed_at":"2014-10-23T06:17:45Z","git_url":"git://github.com/mizzao/meteor-autocomplete.git","ssh_url":"git@github.com:mizzao/meteor-autocomplete.git","clone_url":"https://github.com/mizzao/meteor-autocomplete.git","svn_url":"https://github.com/mizzao/meteor-autocomplete","homepage":"","size":1193,"stargazers_count":163,"watchers_count":163,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":22,"forks":46,"open_issues":22,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls/77"},"html":{"href":"https://github.com/mizzao/meteor-autocomplete/pull/77"},"issue":{"href":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/77"},"comments":{"href":"https://api.github.com/repos/mizzao/meteor-autocomplete/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mizzao/meteor-autocomplete/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/mizzao/meteor-autocomplete/statuses/479e284bae5b1c14f37b5bd0a5b1f1e874b04cd1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":17,"deletions":1,"changed_files":2}}