{"action":"opened","issue":{"url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/799","repository_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect","labels_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/799/labels{/name}","comments_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/799/comments","events_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/799/events","html_url":"https://github.com/davidstutz/bootstrap-multiselect/issues/799","id":175201567,"number":799,"title":"Clickable optgroup label doesn't trigger change event","user":{"login":"CodeBrauer","id":2059754,"avatar_url":"https://avatars.githubusercontent.com/u/2059754?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeBrauer","html_url":"https://github.com/CodeBrauer","followers_url":"https://api.github.com/users/CodeBrauer/followers","following_url":"https://api.github.com/users/CodeBrauer/following{/other_user}","gists_url":"https://api.github.com/users/CodeBrauer/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeBrauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeBrauer/subscriptions","organizations_url":"https://api.github.com/users/CodeBrauer/orgs","repos_url":"https://api.github.com/users/CodeBrauer/repos","events_url":"https://api.github.com/users/CodeBrauer/events{/privacy}","received_events_url":"https://api.github.com/users/CodeBrauer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-06T09:31:39Z","updated_at":"2016-09-06T09:31:39Z","closed_at":null,"body":"Using `enableClickableOptGroups: true` on a multiple select works fine. But clicking an optgroup-label will not trigger an \"change\" event on the select.\r\n\r\nSo the value(s) of the `<select>` changes but no event listener will detect this change.\r\n\r\n![screenshot gif](https://cl.ly/1n3Z2C2F200o/Screen%20Recording%202016-09-06%20at%2011.28%20vorm..gif)\r\n\r\nDemo of this issue on https://jsfiddle.net/85pbc12a/1/\r\n\r\nI created a very quick and dirty fix:\r\n```js\r\n$('.multiselect-group-clickable').click(function() {\r\n  // not the best way to find the select...\r\n  $(this).parentsUntil('.btn-group').parent().parent().find('select').trigger('change');\r\n```\r\n\r\nDemo \"fixed\" version: https://jsfiddle.net/36jw8cdm/1/"}}
{"actor":{"display_login":"CodeBrauer"}}