ivaynberg/select2 — pull request #2676 by colemanw (2014-09-11 18:25:32+00:00)
Title: Add includeChildrenInSearch configuration param

The current behavior wrt optgroups is weird in some situations. If you have a list of options like

* __Fruit__
* Orange
* Apple
* Banana

and the user types "fru" in the search box, it will show nothing but __Fruit__ in the list, and it is not selectable.

This PR extends select2 to add the option to show all children of an optgroup when the search string matches the optgroup label. I named the option "includeChildrenInSearch"