{"action":"opened","issue":{"url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/711","repository_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect","labels_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/711/labels{/name}","comments_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/711/comments","events_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/711/events","html_url":"https://github.com/davidstutz/bootstrap-multiselect/issues/711","id":137196726,"number":711,"title":"deselect/select doesn't work with search when value is typed in search","user":{"login":"Abhilash3","id":4310627,"avatar_url":"https://avatars.githubusercontent.com/u/4310627?v=3","gravatar_id":"","url":"https://api.github.com/users/Abhilash3","html_url":"https://github.com/Abhilash3","followers_url":"https://api.github.com/users/Abhilash3/followers","following_url":"https://api.github.com/users/Abhilash3/following{/other_user}","gists_url":"https://api.github.com/users/Abhilash3/gists{/gist_id}","starred_url":"https://api.github.com/users/Abhilash3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abhilash3/subscriptions","organizations_url":"https://api.github.com/users/Abhilash3/orgs","repos_url":"https://api.github.com/users/Abhilash3/repos","events_url":"https://api.github.com/users/Abhilash3/events{/privacy}","received_events_url":"https://api.github.com/users/Abhilash3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-29T09:20:31Z","updated_at":"2016-02-29T09:20:31Z","closed_at":null,"body":"Hello,\r\n\r\n        select.multiselect('deselect', 'foo');\r\n\r\nfails when we have search enabled and searched 'foo', relevant code:\r\n\r\n        getInputByValue: function (value) {\r\n\r\n            var checkboxes = $('li input', this.$ul);\r\n            var valueToCompare = value.toString();\r\n\r\n            for (var i = 0; i < checkboxes.length; i = i + 1) {\r\n                var checkbox = checkboxes[i];\r\n                if (checkbox.value === valueToCompare) {\r\n                    return $(checkbox);\r\n                }\r\n            }\r\n        },\r\n\r\nThis method, gets the first checkbox (actually first input, even search), and when an option's value is equal to the text written in search then the above method returns the search box instead of the actual checkbox."}}