{"action":"created","issue":{"url":"https://api.github.com/repos/guylabs/ion-autocomplete/issues/23","labels_url":"https://api.github.com/repos/guylabs/ion-autocomplete/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/guylabs/ion-autocomplete/issues/23/comments","events_url":"https://api.github.com/repos/guylabs/ion-autocomplete/issues/23/events","html_url":"https://github.com/guylabs/ion-autocomplete/issues/23","id":81010114,"number":23,"title":"Ability to pass sort of id to the item-method","user":{"login":"lhrolim","id":53955,"avatar_url":"https://avatars.githubusercontent.com/u/53955?v=3","gravatar_id":"","url":"https://api.github.com/users/lhrolim","html_url":"https://github.com/lhrolim","followers_url":"https://api.github.com/users/lhrolim/followers","following_url":"https://api.github.com/users/lhrolim/following{/other_user}","gists_url":"https://api.github.com/users/lhrolim/gists{/gist_id}","starred_url":"https://api.github.com/users/lhrolim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhrolim/subscriptions","organizations_url":"https://api.github.com/users/lhrolim/orgs","repos_url":"https://api.github.com/users/lhrolim/repos","events_url":"https://api.github.com/users/lhrolim/events{/privacy}","received_events_url":"https://api.github.com/users/lhrolim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/guylabs/ion-autocomplete/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"guylabs","id":1892848,"avatar_url":"https://avatars.githubusercontent.com/u/1892848?v=3","gravatar_id":"","url":"https://api.github.com/users/guylabs","html_url":"https://github.com/guylabs","followers_url":"https://api.github.com/users/guylabs/followers","following_url":"https://api.github.com/users/guylabs/following{/other_user}","gists_url":"https://api.github.com/users/guylabs/gists{/gist_id}","starred_url":"https://api.github.com/users/guylabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guylabs/subscriptions","organizations_url":"https://api.github.com/users/guylabs/orgs","repos_url":"https://api.github.com/users/guylabs/repos","events_url":"https://api.github.com/users/guylabs/events{/privacy}","received_events_url":"https://api.github.com/users/guylabs/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/guylabs/ion-autocomplete/milestones/3","html_url":"https://github.com/guylabs/ion-autocomplete/milestones/0.2.2","labels_url":"https://api.github.com/repos/guylabs/ion-autocomplete/milestones/3/labels","id":1103526,"number":3,"title":"0.2.2","description":"","creator":{"login":"guylabs","id":1892848,"avatar_url":"https://avatars.githubusercontent.com/u/1892848?v=3","gravatar_id":"","url":"https://api.github.com/users/guylabs","html_url":"https://github.com/guylabs","followers_url":"https://api.github.com/users/guylabs/followers","following_url":"https://api.github.com/users/guylabs/following{/other_user}","gists_url":"https://api.github.com/users/guylabs/gists{/gist_id}","starred_url":"https://api.github.com/users/guylabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guylabs/subscriptions","organizations_url":"https://api.github.com/users/guylabs/orgs","repos_url":"https://api.github.com/users/guylabs/repos","events_url":"https://api.github.com/users/guylabs/events{/privacy}","received_events_url":"https://api.github.com/users/guylabs/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":6,"state":"open","created_at":"2015-05-10T10:06:12Z","updated_at":"2015-05-26T18:33:13Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-05-26T15:20:46Z","updated_at":"2015-05-27T05:30:59Z","closed_at":null,"body":"Hi,\r\n\r\nI´m starting to use the component, but I think it misses the hability to build the query based upon some key, besides the text itself.\r\n\r\nI´m not sure, if there´s any suggested workaround though, please let me know. \r\n\r\nI´ll try to explain it:\r\n\r\nSuppose, for instance, that I have one screen with 2+ components, and that for each of them the query should be created differently.\r\n\r\nThe screen is also generated dinamically, on a ng-repeat, based upon a JSON structure, so I can´t really declare the html on 2 different ways (calling 2 different functions).\r\n\r\nInstead, I´d rather have something like that (just a suggestion)\r\n\r\n<input ng-switch-default type=\"text\" ng-model=\"datamap[field.attribute]\" items-method=\"associationsSearch(query,identifier)\" id=\"{{field.attribute}}\">\r\n\r\nIdeally this second attribute should be optional, so that there´s no API incompatibility.\r\n\r\nWe could also make it a single queryParameter attribute:\r\n\r\nqueryParameter:\r\n{\r\nquery:'xxx'\r\nid: '123'\r\n}\r\n\r\nBut I sense this would be undesirable for most cases\r\n\r\nSo that, both the query string and a identifier of the component are passed to the callback function. This way, I would have means of knowing how to build the proper query.\r\n\r\nA \"this\" reference to the element could also solve it, but it feels a little overkill for the task.\r\n\r\nIs there any workaround for it?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/guylabs/ion-autocomplete/issues/comments/105762796","html_url":"https://github.com/guylabs/ion-autocomplete/issues/23#issuecomment-105762796","issue_url":"https://api.github.com/repos/guylabs/ion-autocomplete/issues/23","id":105762796,"user":{"login":"guylabs","id":1892848,"avatar_url":"https://avatars.githubusercontent.com/u/1892848?v=3","gravatar_id":"","url":"https://api.github.com/users/guylabs","html_url":"https://github.com/guylabs","followers_url":"https://api.github.com/users/guylabs/followers","following_url":"https://api.github.com/users/guylabs/following{/other_user}","gists_url":"https://api.github.com/users/guylabs/gists{/gist_id}","starred_url":"https://api.github.com/users/guylabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guylabs/subscriptions","organizations_url":"https://api.github.com/users/guylabs/orgs","repos_url":"https://api.github.com/users/guylabs/repos","events_url":"https://api.github.com/users/guylabs/events{/privacy}","received_events_url":"https://api.github.com/users/guylabs/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T05:30:59Z","updated_at":"2015-05-27T05:30:59Z","body":"Ok thanks for that. You mean that you will also need it in the clicked item callback right? I can implement it in both places and then finally release 0.2.2."}}