             values = [].concat.apply([], [values]) # flatten
             return values.includes(String(value.connect_option_id))
 
-          updateTargetComponent(data, componentTarget)
+          updateTargetComponent(data, componentTarget, component)
 
 )(jQuery)

    data.forEach (opt) ->
      element.append($("<option></option>").attr("value", opt.value).text(opt.text))

  updateTargetComponent = (data, componentTarget) ->
    updateOptionsHtml(data, componentTarget)
    componentTarget.multiSelect('refresh')  if componentTarget.hasClass('multi-column')
    componentTarget.selectpicker('refresh') if componentTarget.hasClass('selectpicker')
    componentTarget.multiselect('rebuild')  if componentTarget.hasClass('multi-select')

        if mode == "remote"
          params = { "#{ name }": values }
          $.ajax({ url: target.url, data: params }).done (data) ->
            updateTargetComponent(data, componentTarget, component)

        if mode == "local"
          data = target.data || settings.target.data
