I got very simple lightning component that works fine as quick action but when I place the component on VF page it does not render properly. I am not sure why it would add loading spinner on VF page? It does not do that when using the component as quick action??
Aura Application (addToObject_VF.app)
<aura:application access="GLOBAL" extends="ltng:outApp">
<aura:dependency resource="c:addToObject"/>
</aura:application>
Lightning Component (addToObject.cmp)
<aura:component implements="force:lightningQuickAction,force:hasRecordId" controller="MyController">
<aura:attribute name="obj" type="CustomObject__c" default="{ 'sobjectType': 'CustomObject__c' }"/>
<label class="slds-form-element__label" for="Name">Name</label>
<aura:handler value="{!v.obj.Campaign__c}" name="change" action="{!c.getChildRecords}"/>
<force:inputField aura:id="Name" value="{!v.obj.Campaign__c}" required="true"/>
</aura:component>
VF page
<apex:page standardController="Contact" recordSetVar="providers" standardStylesheets="false" extensions="ProviderQuickActionController" cache="false" >
<apex:includeLightning />
<apex:form >
<div id="lightning" style="width:50%; padding-left:25%"/>
</apex:form>
<script>
$Lightning.use("c:addToObject_VF", function() {
$Lightning.createComponent("c:addToObject",
{ "recordIds" : '{!registrants}' },
"lightning",
function(cmp) {
console.log(cmp);
});
});
</script>
</apex:page>