 
   labelPath: 'label'
   options: null
+  listHeight: '80'
+  listRowHeight: '20'
 
   hide: ->
     @set('isOpen', false)

    popup.container = popup.get('targetObject.container')
    popup.appendTo '.ember-application'

    Ember.run.next this, -> @position(options.targetObject, popup)
    popup


  didInsertElement: ->
    @set('isOpen', true)

  updateHeight: ->
    optionCount = @get('options.length')
    rowHeight = @get('listRowHeight')

    if optionCount <= 12
      @set('listHeight', (optionCount * rowHeight))
    else
      @set('listHeight', (10 * rowHeight))

  optionsDidChange: (->
    @updateHeight()
  ).observes 'options.length'

  listView: Ember.ListView.extend
    classNames: ['eui-options']
    height: Ember.computed.alias 'controller.listHeight'
    rowHeight: Ember.computed.alias 'controller.listRowHeight'

    itemViewClass: Ember.ListItemView.extend
      classNames: ['eui-option']
