I am creating a lightning component which shows opportunity in edit mode using lightning:recordform tag(summer 18 salesforce release). Now when I am clicking on cancel button it should close the quick action dialogue but it is displaying the same record in view mode on same quick action dialogue.
code sample :
<lightning:recordForm
recordId="{!v.recordId}"
objectApiName="Opportunity"
layoutType="Full"
columns="2"
mode="edit"
onsubmit="{!c.handleSubmit}"/>
Best Answer
You need to add "oncancel" as an attribute:
For some reason it is not in their documentation which can be found here but it works for me!
Hopefully this solves your issue.