Skip to main content

Posts

Showing posts with the label Facet and Slots

Send Events to an Enclosing Aura Component

To communicate from child to parent, dispatch an event. Lightning web components fire DOM events. An enclosing Aura component can listen for these events, just like an enclosing Lightning web component can. In Aura, you add components into facets. In Lightning web components, you add components into slots. Facet:          <aura:component implements="flexipage:availableForAllPageTypes">           <c:lwcCompo1 />             <c:lwccompo2 />          </aura:component> Slots:          <template>               <c-lwcComp></c-lwcComp>               .....         </template> Example/Syntax: const filterChangeEvent = new CustomEvent('filterchange', { detail: { filters }, }); // Fire the custom event this.dispatchEvent(filterChangeEvent); In Aura: Component: <lightning:layout> <lightning:layoutItem size="4">

Translate