{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-select/issues/1845","repository_url":"https://api.github.com/repos/angular-ui/ui-select","labels_url":"https://api.github.com/repos/angular-ui/ui-select/issues/1845/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-select/issues/1845/comments","events_url":"https://api.github.com/repos/angular-ui/ui-select/issues/1845/events","html_url":"https://github.com/angular-ui/ui-select/pull/1845","id":187081821,"number":1845,"title":"fix(#271) if option is set the refresh function is getting the request.","user":{"login":"Jefiozie","id":17835373,"avatar_url":"https://avatars.githubusercontent.com/u/17835373?v=3","gravatar_id":"","url":"https://api.github.com/users/Jefiozie","html_url":"https://github.com/Jefiozie","followers_url":"https://api.github.com/users/Jefiozie/followers","following_url":"https://api.github.com/users/Jefiozie/following{/other_user}","gists_url":"https://api.github.com/users/Jefiozie/gists{/gist_id}","starred_url":"https://api.github.com/users/Jefiozie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jefiozie/subscriptions","organizations_url":"https://api.github.com/users/Jefiozie/orgs","repos_url":"https://api.github.com/users/Jefiozie/repos","events_url":"https://api.github.com/users/Jefiozie/events{/privacy}","received_events_url":"https://api.github.com/users/Jefiozie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-11-03T14:51:59Z","updated_at":"2016-11-07T19:01:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/angular-ui/ui-select/pulls/1845","html_url":"https://github.com/angular-ui/ui-select/pull/1845","diff_url":"https://github.com/angular-ui/ui-select/pull/1845.diff","patch_url":"https://github.com/angular-ui/ui-select/pull/1845.patch"},"body":"I think this is something that is requested multiple times: #271, #625,#619.\r\n\r\nUsed the initial changes from 625 with some minor adjustments to let everything work and only watch variables if needed.\r\n\r\nIf this is a viable solution i think all the other can be closed down.\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-select/issues/comments/258929116","html_url":"https://github.com/angular-ui/ui-select/pull/1845#issuecomment-258929116","issue_url":"https://api.github.com/repos/angular-ui/ui-select/issues/1845","id":258929116,"user":{"login":"Jefiozie","id":17835373,"avatar_url":"https://avatars.githubusercontent.com/u/17835373?v=3","gravatar_id":"","url":"https://api.github.com/users/Jefiozie","html_url":"https://github.com/Jefiozie","followers_url":"https://api.github.com/users/Jefiozie/followers","following_url":"https://api.github.com/users/Jefiozie/following{/other_user}","gists_url":"https://api.github.com/users/Jefiozie/gists{/gist_id}","starred_url":"https://api.github.com/users/Jefiozie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jefiozie/subscriptions","organizations_url":"https://api.github.com/users/Jefiozie/orgs","repos_url":"https://api.github.com/users/Jefiozie/repos","events_url":"https://api.github.com/users/Jefiozie/events{/privacy}","received_events_url":"https://api.github.com/users/Jefiozie/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T19:01:24Z","updated_at":"2016-11-07T19:01:24Z","body":"@user378230, so reverted the broadcast event. But also found a other use case where we could fix the original problem.By checking if the `newValue !== ''` and check if` newValue !== oldValue` we will prevent the initial call on load. As the watch is fired every time a user  types in a char it will execute the refresh function.\r\n\r\nSecond we will fire a refresh on activating the ui-select where the value of `$select.search` is already empty (as it should because nothing is present at that time).\r\n\r\nDo you believe this is a good way to solve the problem?\r\n\r\np.s. all test are passing. 😄 "}}
{"actor":{"display_login":"Jefiozie"}}