1

I'm trying to use force:inputField component for lookup fields in a lightning component. But event though lookup field shows up correct, it does not render correct in an html table. My html component is below. Why might be the problem?

enter image description here

<aura:component controller="AccountApexController">
    <aura:attribute name="myAcc" type="Account" default="{ sobjectType: 'Account' }" />
    <div>
            <table class="slds-table" width="100%">

                    <tr>
                        <td><force:inputField aura:id="myAcc" value="{!v.myAccount.TestField__c}" /></td>
                    </tr>
            </table>
        </div>
</aura:component>
1

I've found the problem. It was lightning design system's slds-table tag. When I removed it input field rendered just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.