I have created a custom lightning component to add on a tab on detail page. It contains field from custom object in a list form/table. The field call_comments__c is a long text field and it needs to display the entire text that it contains. The height of the row can expand if need be.

I have tried lightning:datatable but they do not allow wrapping by default (Please correct me if I am wrong). I tried css style of word:break. Nothing seems to work. I have stripped down there component because i did not know if I should use html table tag or lightning:layout. I would appreciate any help. Thanks

My component:

<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global" controller="scheduledAptCtrl">

    <aura:attribute name="engList" type="List"/>
    <aura:handler name="init" action="{!c.doInIt}" value="{!this}" />

   <lightning:layout horizontalAlign="spread" multipleRows="true" class="slds-grid slds-wrap">

            <aura:iteration items="{!v.engList}" var="eng" >

             <div class="slds-grid slds-wrap">      
      <lightning:layoutItem class="slds-col slds-size_1-of-12"><ui:outputDate value="{!eng.Activity_Date__c}"/></lightning:layoutItem> 
      <lightning:layoutItem class="slds-col slds-size_1-of-12"><ui:outputText value="{!eng.ContactName}"/> </lightning:layoutItem>                  
      <lightning:layoutItem class="slds-col slds-size_1-of-12"><ui:outputText value="{!eng.Call_Disposition__c}"/></lightning:layoutItem>                
      <lightning:layoutItem class="slds-col slds-size_9-of-12"><ui:outputText value="{!eng.Call_Comments__c}"/></lightning:layoutItem>


Your Answer

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

Browse other questions tagged or ask your own question.