I have aura:iteration
which goes through my custom wrapper class (which contains List
of sObjects), and show recordEditFrom
for all of them.
My wrapper does not have an Id
field.
However, it has a key field (Something like this Port 1, test product
) that is unique.
And I have a custom submit button.
Here is my code :
<aura:component>
<aura:iteration items="{!v.data}" var="item">
<lightning:recordEditForm aura:id="editForm" recordId="{!item.Id}"
objectApiName="Custom_Object__c"
onsubmit="{!c.onRecordSubmit}">
<lightning:inputField fieldName="Custom_Field__c"/>
<lightning:button variant="brand" label="Save" aura:Id="!{item.key}" type="submit" />
</lightning:recordEditForm>
</aura:iteration>
</aura:component>
So my questions are:
Do we have a possibility in the onRecordSubmit
check on which button from the aura:iteration
list we clicked?
I tried aura:Id
, however, it can not be generated here
Any help will be appreciated.
Thank you.