0

I'm directly using LWC component in the Quick Action through flow, once the submit button is called I'm dispatching an event from LWC but aura is not capturing and also Quick action modal is not closing.

Here is the code:

LWC

closeModalQuickAction() {
        this.dispatchEvent( new CustomEvent('closeQuickAction'));
    } 

Aura :

<aura:component implements ="force:lightningQuickActionWithoutHeader" >
    <c:dynamicInputTable oncloseQuickAction="{!c.closeModal}"/> 
</aura:component>

({
    closeModal : function(component, event, helper) {
        console.log("closing the popup");
        
        $A.get("e.force:closeQuickAction").fire();
    }
})

this is how I'm doing but nothing is happening

1
  • At a guess, have you tried onCloseQuickAction instead of oncloseQuickAction?
    – Nick Cook
    May 11 at 6:02
0

The issue is that you can't have Capital Letters in event name. Change closeQuickAction to either closequickaction or close_quick_action and it should work, sometimes LWC doesn't show it as error, but it'll never work with capital letters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.