how can one bind onchange event handlers to the fields of the lightning:recordform
component?
component.cmp
<aura:attribute name="fieldsArray" type="String[]"
default="['Subject','Description']" />
<lightning:recordForm aura:id="recordForm"
objectApiName="Case"
fields="{!v.fieldsArray}"
layout="Full"
mode="Edit"
onsubmit="{!v.submit}"
/>
if i were to use lightning:recordEditForm
component, i would simply add it in my field component as follows:
<lightning:inputField fieldName="Subject" onchange="{!c.itemsChange}"/>
the lack of documentation on this component doesnt make this easy.
v.fieldsArray
and change a value in an input? Any change event handled? – tsalb Jun 20 '18 at 3:48fields
attribute on recordEditForm that you can inspect to retrieve field values. Since this component supposedly builds on top of recordEditForm I had thought maybe you can inspect it somehow. – tsalb Jun 20 '18 at 4:47component.find("recordForm").get("v.fields")
does it return more than your original list of strings? I'm out of ideas after that. – tsalb Jun 20 '18 at 4:49