0

I'm creating a Lightning Quick Action and have implemented lightningQuickActionWithoutHeader, as I'm trying customize exactly how the component interface looks when the user clicks the action from the UI.

Here is my component:

<aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId" access="global">
    <aura:attribute name="recordId" type="String" /> 
    <aura:attribute name="showConfirmDialog" type="boolean" default="true"/>   
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

    <div class="slds-m-around_xx-large">         
        <aura:if isTrue="{!v.showConfirmDialog}">
            <div role="dialog" class="slds-modal slds-fade-in-open ">
                <div class="slds-modal__container">
                    <header class="slds-modal__header">
                        <h1 class="slds-text-heading--medium">Confirmation</h1>
                    </header>
                    <div class="slds-modal__content slds-p-around--medium">
                        <center><b>Are you sure you want to move the order to Awaiting Customer Information?</b></center>
                    </div>
                    <footer class="slds-modal__footer">
                        <lightning:button name='No' label='No' onclick='{!c.handleConfirmDialogNo}'/>
                        <lightning:button variant="brand" name='Yes' label='Yes' onclick='{!c.handleConfirmDialogYes}'/>
                    </footer>
                </div>
            </div>
            <div class="slds-backdrop slds-backdrop--open"></div>            
        </aura:if>
    </div>
</aura:component>

Is it possible to either have the confirm modal within the quick action composer or remove the quick action composer so that just the modal interface opens? Currently, when the action is clicked, the modal opens on top of the quick action composer. So, when you click "Yes" or "No" the modal closes, but the quick action composer is still open and you have to click to close that dialog box as well. Is it possible to remove that so it doesn't open? Or, make the modal open within that quick action composer dialog? Thanks.

0

You cannot close the base dialog without also closing the top modal window. But you can close the base dialog in code by calling $A.get("e.force:closeQuickAction").fire(); - in this case when one of the buttons is pressed.

Maybe you can do this without adding the second modal layer. Just treat the close (X) button as No.

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.