+ Start a Discussion

lightning:recordForm cancel not working

I'm trying to mimic a related list with a lightning component that has a data table in a card with a new button. When the new button is clicked, I'd like to launch a modal with a lightning:recordForm that has the fields used in the page layout for easy maintenance. This all works well and is able to save, but if the user clicks cancel, nothing happens. It looks like this is the expected behavior of the component, can't capture the cancel to do anything, cancel doesn't do anything on its own. Is there another approach I should take? The feature I really like about the component is that I give it a record id and the page layout the administrators maintain is used, so I don't have to programmatically try to recreate it. but if the cancel button doesn't work, the form looks like it doesn't work properly. whats the solution here?