Add button to the footer of a Lightning Quick Action component

  • Can you add an additional footer button next to Cancel for a Lightning Quick Action?

    <aura:component implements="force:lightningQuickAction">
        <ui:button label="Save Button" />
    </aura:component>
    

    I'm aware that I can use force:lightningQuickActionWithoutHeader and customize the whole design. Just wondering in the Lightning System provides a built in way of doing this.

    <aura:component implements="force:lightningQuickActionWithoutHeader">
        <ui:button label="Save Button" />
        <ui:button label="Cancel Button" />
    </aura:component>
    

    Lightning Quick Action Modal

  • I'm afraid you can't. I would like to be able to do it to, at least customize the behavior of the "Save" button, but unfortunately it's not possible.

    As you said, you need either to put the button inside your component with force:lightningQuickAction, or recreate everything in a component with force:lightningQuickActionWithoutHeader. Solution 1 is easier but not good looking and not consistent with the standard UI, but solution 2 needs more work.

    You can use Salesforce Lightning Design System modal as a starting point for solution 2, but bear in mind that the look & feel is different in Salesforce1, if you use it.

    Also, you can create a Idea for that and post the link here, I would be the first one to vote for it.

    Last point, if you have access to the Partner Community, I asked the question here so I guess you can add your own comment to the thread to show the PMs I'm not the only one interested.

    Would you mind sharing you code to get it done using force:lightningQuickActionWithoutHeader?

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM