             "Please select at least one entity to copy"])
          [:div {:style {:marginTop "1em"}}
           [comps/Button {:text "Import"
-                         :onClick #(let [selected (react/call :get-selected-entities (@refs "EntitySelector"))]
+                         :onClick #(let [selected ((@refs "EntitySelector") :get-selected-entities)]
                                      (if (empty? selected)
                                        (swap! state assoc :selection-error true)
-                                       (react/call :perform-copy this selected)))}]]]]))
+                                       (this :perform-copy selected)))}]]]]))
    :perform-copy
    (fn [{:keys [props state this]} selected re-link?]
      (swap! state assoc :selection-error nil :server-error nil :copying? true)

       :else [:div {:style {:textAlign "center"}} [comps/Spinner {:text "Loading entities..."}]]))
   :component-did-mount
   (fn [{:keys [this]}]
     (react/call :load-entities this))
   :load-entities
   (fn [{:keys [state props]}]
     (endpoints/call-ajax-orch

                      {:text "Re-link"
                       :onClick (fn []
                                  (modal/pop-modal)
                                  (this :perform-copy selected true))}
                      "OK")})))})


