Activity Forums Salesforce® Discussions What are phases in Component Event in Salesforce?

  • Shweta

    Member
    February 7, 2020 at 1:00 pm

    Component Event supports capture and bubble phases . Phases give you flexibility for how to best process the event for your application.

    Capture Phase : In this, Event is captured and trickles down from the application root to the source component.The event can be handled by a component in the containment hierarchy that receives the captured event.

    <aura:handler name="compEvent" event="c:compEvent" action="{!c.handleCapture}" phase="capture" />

    Bubble Phase : In this, Event can be handled by a component in the containment hierarchy that receives the bubbled event. The event then bubbles up from the source component to the application root.

     <aura:handler name="compEvent" event="c:compEvent" action="{!c.handleBubbling}"/>

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos