2020

Salesforce

How to display set decimals for a number field in lightining:dataTable in Salesforce?

Sample Code: Component:<aura:component implements="force:appHostable"                    controller="AccountListController">                <aura:attribute type="Account[]" name="acctList"/>        <aura:attribute name="mycolumns" type="List"/>                <aura:handler name="init" value="{!this}" action="{!c.fetchAccounts}"/>                <lightning:datatable data="{! v.acctList }"                              columns="{! v.mycolumns ....

Salesforce

for:each in LWC HTML in Salesforce

Sample code: HTML: <template> <div class="slds-box slds-theme_default"> <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_col-bordered"> <thead> <tr> <th class="" scope="col"> <div class="slds-truncate" title="Account Name">Name</div> </th> <th class="" scope="col"> <div class="slds-truncate" title="Account Industry">Industry</div> </th> ....