Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. <aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" controller="dataTableSampleREST">
  2. <!-- attributes -->
  3. <aura:attribute name="recordId" type="String"></aura:attribute>
  4. <aura:attribute name="mydata" type="Object"></aura:attribute>
  5. <aura:attribute name="mycolumns" type="List"></aura:attribute>
  6. <aura:attribute name="noResults" type="String"></aura:attribute>
  7. <!-- handlers-->
  8. <aura:handler name="init" value="{! this }" action="{! c.init }"></aura:handler>
  9.  
  10. <article aura:id="gridContainer" class="slds-card slds-card_boundary">
  11. <lightning:card title="Documents" iconName="standard:document">
  12. <div class="slds-card__header slds-grid">
  13. <aura:if isTrue="{!not(empty(v.mydata))}" >
  14. <!-- the container element determine the height of the datatable -->
  15. <lightning:datatable keyField="id"
  16. data="{! v.mydata }"
  17. columns="{! v.mycolumns }"
  18. hideCheckboxColumn="true"
  19. sortable="false"
  20. onrowaction="{!c.getDocument}"></lightning:datatable>
  21. </aura:if>
  22. <aura:if isTrue="{!empty(v.mydata)}" >
  23. <p>{!v.noResults}</p>
  24. </aura:if>
  25. </div>
  26. </lightning:card>
  27. </article>
  28. </aura:component>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement