You need to sign in to do that
Don't have an account?
Ty Whitfield
Lightning Component Long Text Fields go off page
I've created a Lightning Component record page using lightning:recordForm. The logic for what we wanted works, however, I've noticed that Rich Text, Long Text fields, etc. will go on past the page even using slds-truncate_container_25, wordwrap, css max-width. Is there a way to fix this
<lightning:card iconName="utility:description" title="Description"> <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_striped slds-rich-text-area__content slds-grow slds-cell-wrap"> <tr> <td > <lightning:recordViewForm recordId="{!v.recordId}" objectApiName="Opportunity"> <div style="max-width:300px" class="slds-box"> <lightning:outputField fieldName="Description" /> </div> </lightning:recordViewForm> <!-- <lightning:recordForm aura:id="myRecordForm" recordId="{!v.recordId}" objectApiName="Opportunity" fields="{!v.descriptionFields}" columns="1" mode="view" > <lightning:outputField fieldName="Description" /> </lightning:recordForm>--> </td> </tr> </table> </lightning:card>
All Answers
Can you try the below options:
- Change max-width to width
- Remove the div and apply width tag to td
- If supported try applying width tag to the lightning:output tag itself.
Let me know if this works for you.Thanks,
Abhishek Bansal.