ivaynberg/select2 — pull request #777 by mikemackintosh (2013-01-31 16:17:11+00:00)
Title: Added support to display optgroup name as prefix for value in multiple instances

Added optgroup labels to options to help with clarity when select has multiple enabled.

Example:

itemA

itemC

itemA

itemB

itemD

$('.prefix').select2({groupPrefix: true });

Displayed selected items will now look like:

Group1: itemA Group2: itemA Group2: itemB