{"action":"closed","issue":{"url":"https://api.github.com/repos/angular-ui/ui-select/issues/516","repository_url":"https://api.github.com/repos/angular-ui/ui-select","labels_url":"https://api.github.com/repos/angular-ui/ui-select/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-select/issues/516/comments","events_url":"https://api.github.com/repos/angular-ui/ui-select/issues/516/events","html_url":"https://github.com/angular-ui/ui-select/issues/516","id":52048396,"number":516,"title":"Erase current selected object when input is blank","user":{"login":"bettercallsteve","id":10201088,"avatar_url":"https://avatars.githubusercontent.com/u/10201088?v=3","gravatar_id":"","url":"https://api.github.com/users/bettercallsteve","html_url":"https://github.com/bettercallsteve","followers_url":"https://api.github.com/users/bettercallsteve/followers","following_url":"https://api.github.com/users/bettercallsteve/following{/other_user}","gists_url":"https://api.github.com/users/bettercallsteve/gists{/gist_id}","starred_url":"https://api.github.com/users/bettercallsteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bettercallsteve/subscriptions","organizations_url":"https://api.github.com/users/bettercallsteve/orgs","repos_url":"https://api.github.com/users/bettercallsteve/repos","events_url":"https://api.github.com/users/bettercallsteve/events{/privacy}","received_events_url":"https://api.github.com/users/bettercallsteve/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-12-15T22:33:15Z","updated_at":"2016-03-27T17:00:32Z","closed_at":"2016-03-27T17:00:32Z","body":"Newguy here, \r\n\r\nI noticed that my users are trying to clear a current selected item by clicking on the ui-select, clearing the search box and then clicking out / escaping / hitting enter. This keeps the current item selected even though the search box is empty. Even with a delete button at the end of the input field, it still creates an awkward experience for the user as it does not perform as expected.\r\n\r\nI think that there should be an option to clear the ng-model when the search box is empty and the user escapes the input.\r\n\r\nFor example, search for anything into the first ui-select in this plunker:\r\n\r\nhttp://plnkr.co/edit/a3KlK8dKH3wwiiksDSn2?p=preview\r\n\r\nAfter you've selected something, click on the ui-select again, and delete the search selection. Then, click outside of the input box. The previously selected item will appear again, even though this goes against what a user would expect to happen.\r\n\r\nI have attempted to fix this on my own build but I lack the experience to properly do it. If anyone could help me figure this one out that would be great.\r\n\r\nThank you!"}}