Created
January 22, 2019 18:44
-
-
Save choudharymanish8585/f98da573f3b5abfdfc9fb48ee79c39ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component implements="flexipage:availableForRecordHome" access="global" > | |
<!--intantiating unsaved changed component --> | |
<lightning:unsavedChanges aura:id="unsavedData" | |
onsave="{!c.saveData}" | |
ondiscard="{!c.discardData}"/> | |
<lightning:card title="Create Account"> | |
<!-- Handle name change, make unsaved changes in this action as user has typed some value--> | |
<lightning:input name="Name" aura:id="name" label="Enter name" onchange="{!c.handleDataChange}"/> | |
<!-- Handle phone change, make unsaved changes in this action as user has typed some value--> | |
<lightning:input name="Phone" aura:id="phone" type="tel" label="Enter phone number" onchange="{!c.handleDataChange}"/> | |
<!-- Handle save action, clear unsaved changes in this action --> | |
<lightning:button label="Save Account" onclick="{!c.saveAccount}" /> | |
</lightning:card> | |
</aura:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment