You need to sign in to do that
Don't have an account?
Anupama@28
Lighting component else part is displaying before if.
Hi,
I have a lightning compnent exactly same as given in below link...
http://sfdcmonkey.com/2018/10/22/data-table-pagination-checkbox-lightning/.
<aura:if isTrue="{!v.bNoRecordsFound}">
<div class="slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_info" role="alert">
<span class="slds-assistive-text">Error</span>
<h2> ERROR MESSAGE </h2>
</div>
<aura:set attribute="else">
--------------
<table>
<!---- TABLE WITH DATA --->
</table>
-----------------
</aura:set>
</aura:if>
Here, when the lightning component is loaded, even if there are no records to display in table of else section... still a blank table is displayed for a while and goes off... and later error message from if section is shown.
how to avoid this ?
We strictly want to show error message immediately if the given condition is true else display the else section(table).
Thanks,
Anupama
I have a lightning compnent exactly same as given in below link...
http://sfdcmonkey.com/2018/10/22/data-table-pagination-checkbox-lightning/.
<aura:if isTrue="{!v.bNoRecordsFound}">
<div class="slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_info" role="alert">
<span class="slds-assistive-text">Error</span>
<h2> ERROR MESSAGE </h2>
</div>
<aura:set attribute="else">
--------------
<table>
<!---- TABLE WITH DATA --->
</table>
-----------------
</aura:set>
</aura:if>
Here, when the lightning component is loaded, even if there are no records to display in table of else section... still a blank table is displayed for a while and goes off... and later error message from if section is shown.
how to avoid this ?
We strictly want to show error message immediately if the given condition is true else display the else section(table).
Thanks,
Anupama
I have added one more if tag to check if the list is empty as below.
Not sure how does it matters but it worked.
All Answers
I would try to run this code:
Let me know if I can help with anything else. If you find this solution useful, please mark as Best Answer to help others too.
Regards.
Regards.
I can't reach sfdcmonkey.com website. I guess is out for maitenance. Could you send me the bundle?
Regards.
I have added one more if tag to check if the list is empty as below.
Not sure how does it matters but it worked.