I have a simple component which implements force:lightningQuickActionWithoutHeader contains a required input field and custom close button(lightning:button). It's may be the quick action property, to apply onfocus on the first element. So at the time of custom close action, when the input value is null, it applies error property to the focused element which makes user to click the close button, one more time to close the quick action modal.How to overcome this? Here is my code.


<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader" access="global" >
    <div class="slds-m-around_medium">

        <lightning:select name="select1" label="Select One" required="true">
            <option value="">choose one...</option>
            <option value="1">one</option>
            <option value="2">two</option>
            <option value="3">three</option>
    <lightning:button class="slds-float_right slds-m-around_medium" label="cancel" onclick="{!c.close}"/>


    close : function(component, event, helper) {
        var dismissActionPanel = $A.get("e.force:closeQuickAction");

And the quick action modal Image: enter image description here

Is there any idea or solution of without using custom required or adding zero opactity input field above the first element?

Your Answer

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

Browse other questions tagged or ask your own question.