{"action":"created","issue":{"url":"https://api.github.com/repos/select2/select2/issues/4505","repository_url":"https://api.github.com/repos/select2/select2","labels_url":"https://api.github.com/repos/select2/select2/issues/4505/labels{/name}","comments_url":"https://api.github.com/repos/select2/select2/issues/4505/comments","events_url":"https://api.github.com/repos/select2/select2/issues/4505/events","html_url":"https://github.com/select2/select2/issues/4505","id":167837402,"number":4505,"title":"Filtering for optgroups should show their contents","user":{"login":"ypnos-web","id":15981753,"avatar_url":"https://avatars.githubusercontent.com/u/15981753?v=3","gravatar_id":"","url":"https://api.github.com/users/ypnos-web","html_url":"https://github.com/ypnos-web","followers_url":"https://api.github.com/users/ypnos-web/followers","following_url":"https://api.github.com/users/ypnos-web/following{/other_user}","gists_url":"https://api.github.com/users/ypnos-web/gists{/gist_id}","starred_url":"https://api.github.com/users/ypnos-web/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ypnos-web/subscriptions","organizations_url":"https://api.github.com/users/ypnos-web/orgs","repos_url":"https://api.github.com/users/ypnos-web/repos","events_url":"https://api.github.com/users/ypnos-web/events{/privacy}","received_events_url":"https://api.github.com/users/ypnos-web/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-27T12:03:55Z","updated_at":"2016-07-27T16:52:33Z","closed_at":null,"body":"## Prerequisites\r\n\r\n- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate\r\n- [x] The issue still exists against the latest `master` branch of Select2\r\n- [x] This is not a usage question (Those should be directed to the [community](https://select2.github.io/community.html))\r\n- [x] I have attempted to find the simplest possible steos to reproduce the issue\r\n- [x] I have included a failing test as a pull request (Optional)\r\n\r\n## Steps to reproduce the issue\r\n\r\n1. Go to https://select2.github.io/examples.html#select-boxes-with-labels\r\n2. Enter \"pac\"\r\n\r\n## Expected behavior and actual behavior\r\n\r\nCurrently, it will find the resp. optgroup and only show that. This is almost useless, as an optgroup cannot be selected anyways.\r\n\r\nInstead, the optgroup with all its associated options should be shown, so that the user can filter for the group and then select the desired option.\r\n\r\n## Environment\r\n\r\nBrowsers\r\n\r\n- [x] Google Chrome\r\n\r\nOperating System\r\n\r\n- [x] Linux\r\n\r\nLibraries\r\n\r\n- jQuery version: 3.1.0\r\n- Select2 version: 4.0.3\r\n\r\n## Isolating the problem\r\n\r\n- [x] This bug happens [on the examples page](https://select2.github.io/examples.html)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/select2/select2/issues/comments/235648424","html_url":"https://github.com/select2/select2/issues/4505#issuecomment-235648424","issue_url":"https://api.github.com/repos/select2/select2/issues/4505","id":235648424,"user":{"login":"kevin-brown","id":1991850,"avatar_url":"https://avatars.githubusercontent.com/u/1991850?v=3","gravatar_id":"","url":"https://api.github.com/users/kevin-brown","html_url":"https://github.com/kevin-brown","followers_url":"https://api.github.com/users/kevin-brown/followers","following_url":"https://api.github.com/users/kevin-brown/following{/other_user}","gists_url":"https://api.github.com/users/kevin-brown/gists{/gist_id}","starred_url":"https://api.github.com/users/kevin-brown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevin-brown/subscriptions","organizations_url":"https://api.github.com/users/kevin-brown/orgs","repos_url":"https://api.github.com/users/kevin-brown/repos","events_url":"https://api.github.com/users/kevin-brown/events{/privacy}","received_events_url":"https://api.github.com/users/kevin-brown/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T16:52:33Z","updated_at":"2016-07-27T16:52:33Z","body":"This can be handled through a custom `matcher`. It's very close to the [original matcher](https://github.com/select2/select2/blob/3f8492b62f72b34f6a25ed5ae8ffc9a6826cb69d/src/js/select2/defaults.js#L309-L352), just you wouldn't need to [strip out non-matching child objects](https://github.com/select2/select2/blob/3f8492b62f72b34f6a25ed5ae8ffc9a6826cb69d/src/js/select2/defaults.js#L327-L330)."}}
{"actor":{"display_login":"kevin-brown"}}