 
       # Toggle the dropdown label
       if @options.toggleLabel
-        @updateLabel(selectedObject, el)
+        @updateLabel(selectedObject, el, @)
       if value?
         if !field.length and fieldName
           @addInput(fieldName, value)

      # Scroll the dropdown content up
      $dropdownContent.scrollTop(listItemTop - dropdownContentTop)

  updateLabel: (selected = null, el = null) =>
    $(@el).find(".dropdown-toggle-text").text @options.toggleLabel(selected, el)

$.fn.glDropdown = (opts) ->
  return @.each ->


      # Toggle the dropdown label
      if @options.toggleLabel
        @updateLabel(selectedObject, el, @)
      else
        selectedObject
    else if el.hasClass(INDETERMINATE_CLASS)
