emberjs/ember.js — pull request #2465 by tricknotes (2013-04-13 17:54:56+00:00)
Title: Support grouping option for Ember.Select using optgroup

I supported using `Ember.Select` with `optgroup`.

## Usage

The `optionGroupPath` is required to use `optgroup`.

* Source

``` javascript
var content = Ember.A([
{ id: 1, firstName: 'Yehuda', organization: 'Tilde' },
{ id: 2, firstName: 'Tom', organization: 'Tilde' },
{ id: 3, firstName: 'Keith', organization: 'Envato' }
]);

var select = Ember.Select.create({
content: content,
optionGroupPath: 'organization',
optionLabelPath: 'content.firstName',
optionValuePath: 'content.id'
});

select.renderTo('body');
```

* Result

![ 2013-04-14 2 53 44](https://f.cloud.github.com/assets/290782/376916/2221c1b4-a463-11e2-9888-4ba501eb6004.png)

*caution: `content` should be sorted by `optionGroupPath`*.