function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Prakash GBPrakash GB 

Rerender a lightning component after ui:message closed

hi,
how can i rerender a lightning componet after closing a ui:message in it.
 
sfdcMonkey.comsfdcMonkey.com
hi Prakash, can you please do more specific about your requirement
thanks
Prakash GBPrakash GB
i've a lightning component. its a kind of form. after click on submit i'll get a closable ui:message from the same component. i need to rerender whole component after closing ui:message.
sfdcMonkey.comsfdcMonkey.com
use  $A.get('e.force:refreshView').fire(); in your clinet side controller for Reloads the view.

This event is handled by the one.app container. It’s supported in Lightning Experience, Salesforce app, and Lightning communities.

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_force_refreshView.htm?search_text=refresh

i hope it helps you.
      Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
    thanks 
    sfdcmonkey.com 
Prakash GBPrakash GB
but how can i capture ui:message close event?
sfdcMonkey.comsfdcMonkey.com
the only way to do this with ui:message :
<ui:message title="Confirmation" severity="confirm" closable="true" click="{!refreshView}">
      This is a confirmation message.
  </ui:message>


refreshView : function(component,event,helper){
   $A.get('e.force:refreshView').fire();
}


Thanks let us know if it helps you
Prakash GBPrakash GB
but the click event is not working.