{"action":"created","issue":{"url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/679","repository_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect","labels_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/679/labels{/name}","comments_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/679/comments","events_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/679/events","html_url":"https://github.com/davidstutz/bootstrap-multiselect/issues/679","id":123699217,"number":679,"title":"enableCollapsibleOptGroups prevents onChange behaviour change, so it still runs multiple times for the group","user":{"login":"ant-s","id":16417123,"avatar_url":"https://avatars.githubusercontent.com/u/16417123?v=3","gravatar_id":"","url":"https://api.github.com/users/ant-s","html_url":"https://github.com/ant-s","followers_url":"https://api.github.com/users/ant-s/followers","following_url":"https://api.github.com/users/ant-s/following{/other_user}","gists_url":"https://api.github.com/users/ant-s/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-s/subscriptions","organizations_url":"https://api.github.com/users/ant-s/orgs","repos_url":"https://api.github.com/users/ant-s/repos","events_url":"https://api.github.com/users/ant-s/events{/privacy}","received_events_url":"https://api.github.com/users/ant-s/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-23T17:51:18Z","updated_at":"2016-04-17T12:19:15Z","closed_at":null,"body":"When enableClickableOptGrops is enabled it changes the behaviour of onChange from firing once for each element in the group to firing once for the whole group, with all affected options passed as the first parameter. This is good and documented behaviour (see third example here: http://davidstutz.github.io/bootstrap-multiselect/#configuration-options-enableClickableOptGroups).\r\n\r\nEnabling enableCollapsibleOptGroups breaks this behaviour, causing onChange to fire once for each item in the optgroup. An example of this can be seen in this fiddle: http://jsfiddle.net/L4nrh2bz/. Removing the 'enableCollapsibleOptGroups: true' restores the correct behaviour. \r\n\r\nThank you David for creating such a great and flexible plugin. I wish I had the js skills to fix this! \r\n"},"comment":{"url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/comments/211008475","html_url":"https://github.com/davidstutz/bootstrap-multiselect/issues/679#issuecomment-211008475","issue_url":"https://api.github.com/repos/davidstutz/bootstrap-multiselect/issues/679","id":211008475,"user":{"login":"davidstutz","id":1203091,"avatar_url":"https://avatars.githubusercontent.com/u/1203091?v=3","gravatar_id":"","url":"https://api.github.com/users/davidstutz","html_url":"https://github.com/davidstutz","followers_url":"https://api.github.com/users/davidstutz/followers","following_url":"https://api.github.com/users/davidstutz/following{/other_user}","gists_url":"https://api.github.com/users/davidstutz/gists{/gist_id}","starred_url":"https://api.github.com/users/davidstutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidstutz/subscriptions","organizations_url":"https://api.github.com/users/davidstutz/orgs","repos_url":"https://api.github.com/users/davidstutz/repos","events_url":"https://api.github.com/users/davidstutz/events{/privacy}","received_events_url":"https://api.github.com/users/davidstutz/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T12:19:15Z","updated_at":"2016-04-17T12:19:15Z","body":"I will look into this, this should be fixed or at least documented."}}