You need to sign in to do that
Don't have an account?
![Frank van Meegen 42 Frank van Meegen 42](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Refresh lightning component after button click
In a lightning component I have a button that updates a field show__c on a child record. After the update the button should be invisible. This is only working after I do a page refresh.
How can I refresh the lightning component after the button click?
How can I refresh the lightning component after the button click?
<aura:component controller="SampleController" Implements="flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" > <aura:attribute name="childitems" type="List" /> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <!-- Use a data table from the Lightning Design System: https://www.lightningdesignsystem.com/components/data-tables/ --> <table class="slds-table slds-table_bordered slds-table_cell-buffer slds-no-row-hover"> <thead> <tr class="slds-text-heading_label"> <th scope="col"><div class="slds-truncate" title="Button">Button</div></th> </tr> </thead> <tbody> <aura:iteration items="{!v.childitems}" var="childitem"> <tr> <td> <div class="slds-form-element"> <aura:renderIf isTrue="{!childitem.show__c}"> <lightning:button variant="brand" label="Sell" title="{!childitem.Id}" name="{!childitem.Id}" onclick="{!c.updateCheck11}" /> </aura:renderIf> </div> </td> </tr> </aura:iteration> </tbody> </table> </aura:component>
with regards
kodi.software/ messenger.red (https://messenger.red/) hotstar.onl (https://hotstar.onl/)